1.

Solve : copy data step by step?

Answer»

I am new to the batch scripting. Can anyone plz tell me what would be the script of following task

Copy Floppy Disc (main heading)
1. Put in floppy disc [ready for copy]
2. Press Enter key to START copy all DATA from floppy disc into the choice folder in the hard disc [C:\temp_floppy]
3. Upon finish, display message
i. Please insert new floppy disc [Y /N]
ii. Do you want to cancel this operation [Y /N]
Quote from: Adeel on September 11, 2009, 05:55:15 AM

I am new to the batch scripting. Can anyone plz tell me what would be the script of following task

Copy Floppy Disc (main heading)
1. Put in floppy disc [ready for copy]
2. Press Enter key to start copy all data from floppy disc into the choice folder in the hard disc [C:\temp_floppy]
3. Upon finish, display message
i. Please insert new floppy disc [Y /N]
ii. Do you want to cancel this operation [Y /N]


1. Put in floppy disc into drive [ready for copy]
( There is no software command for this task )


C:\>D:

D:\>copy *.* c:\temp_floppy\

Quote from: billrich on September 11, 2009, 07:29:43 AM
1. Put in floppy disc into drive [ready for copy]
( There is no software command for this task )

I think he means display a message to the user to insert a DISK

Code: [Select]@echo off
:loop
cls
echo Insert a floppy disk and then
set /p dummy=press ENTER to start copying
copy a:\*.* c:\temp_floppy
set /p again="Do you want to copy another disk [Y/N] ? "
if /i "%again%"=="Y" goto loop

Thanks mate, your script is working

Actually i m working on project, two more things are yet to do. Can you help me out plz

1. Enter new Directory name
b. Confirm new Directory by [Y /N]

2 - Generate list of folder and file on particular directory

1.

Code: [Select]:loop
set dirname=
set /p dirname="Enter directory name ? "
if /i "%dirname%"=="" (
echo Error: empty input.
echo.
goto loop
)
echo.
echo You entered %dirname%.
:check
set /p correct="Is this correct [Y/N] ? "
if /i "%correct%"=="Y" goto next
if /i "%correct%"=="N" (
echo.
goto loop
)
echo Error: type Y or N only!
echo.
goto check
:next

2. DIR directory

really APPRECIATE your time and effort... but still the required task is not done

In FIRST task, the entered folder name is not being created actually

and

in second task how to generate a list of text files and directories with that command..

will be waiting

thanxQuote from: Adeel on September 13, 2009, 07:37:37 AM
but still the required task is not done

In first task, the entered folder name is not being created actually

and

in second task how to generate a list of text files and directories with that command..


1. You did not say you wanted to create a directory. Study the mkdir command.
2. To learn how to make a list of files and directories, study the dir command. Quote from: Adeel on September 13, 2009, 03:56:07 AM
Actually i m working on project, two more things are yet to do.

This wouldn't be a school project would it?


Discussion

No Comment Found