185 pts.
 I am writing a batch file that will be run from a DVD to copy some necessary files to a location specified by the user.
I am writing a batch file that will be run from a DVD to copy some necessary files to a location specified by the user. I have used switches to get Yes or No input in the past. How do I get a drive location from the user and then verify that on the current system so I can return an error echo?

 Also, is there a way to show progress or a time elapsed/estimated output?



Software/Hardware used:
Windows 7
ASKED: Oct 28, 2010  5:29 PM GMT
UPDATED: November 1, 2010  7:41:04 PM GMT
185 pts.
  Help
 Approved Answer - Chosen by EmNichs

See you have 2 questions

How do I get a drive location from the user and then verify that on the current system so I can return an error echo?
Ans. Try "IF EXIST". I use it to check the existence of the drive/folder/file. I can't remember all sentence but you can explore from here > http://users.cybercity.dk/~bse26236/batutil/help/IF_E.HTM

Also, is there a way to show progress or a time elapsed/estimated output?
Ans. From my knowledge, there is nothing close to what you are looking for. What I do is to use errorlevel of copy command to show that files were copied successfully and pause it to let user see the results and confirm to exit the batch operation.

Hope these help.

These help allot!
Thank you.
ANSWERED:  Oct 29, 2010  3:30 PM (GMT)  by Techy1984   185 pts.

 
Other Answers:
See you have 2 questions

How do I get a drive location from the user and then verify that on the current system so I can return an error echo?
Ans. Try "IF EXIST". I use it to check the existence of the drive/folder/file. I can't remember all sentence but you can explore from here > http://users.cybercity.dk/~bse26236/batutil/help/IF_E.HTM

How to prompt for and capture input within CMD script without additional utilities:
---------
:ASK
ECHO Message about what you are looking for
set /p MyValue=
REM Error Handler for blank input
IF "%MyValue%"=="" goto :ASK
--------

Also, is there a way to show progress or a time elapsed/estimated output?
Ans. Use ROBOCOPY to copy the files and you can present a progress on screen as well as logging the results.

Hope these help.

These help allot!
Thank you.
Last Wiki Answer Submitted:  Nov 1, 2010  7:41 PM (GMT)  by  Pjb0222   3,310 pts.
Latest Answer Wiki Contributors:  Techy1984   185 pts., Diff   60 pts.
To see other answers submitted to the Answer Wiki View Answer History.
Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _