[Solved] Make USB key....

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Eagle710
Posts: 19
Joined: 29 Mar 2009 17:27

[Solved] Make USB key....

#1 Post by Eagle710 » 25 May 2009 15:19

I want to format a USB key a particular way and copy certain files to it. I would like to automate this because I will be setting up a few USB keys....any ideas on a good way of getting this started? I want to make a master batch file that sets this up.
Last edited by Eagle710 on 24 Jun 2009 13:48, edited 1 time in total.

Eagle710
Posts: 19
Joined: 29 Mar 2009 17:27

#2 Post by Eagle710 » 16 Jun 2009 14:13

I have the code that will format and copy the files to the USB key. I was wondering if I could pause and wait allow the user to hit enter when the next usb key is plugged in. Any help with pausing until a user hits the enter key.

avery_larry
Expert
Posts: 391
Joined: 19 Mar 2009 08:47
Location: Iowa

#3 Post by avery_larry » 18 Jun 2009 10:15

Umm . . .

pause


??

Eagle710
Posts: 19
Joined: 29 Mar 2009 17:27

#4 Post by Eagle710 » 21 Jun 2009 08:54

I want to ask the person how many times they want to run this code..... wait for a reply then loop through the code until we reach the last number......

avery_larry
Expert
Posts: 391
Joined: 19 Mar 2009 08:47
Location: Iowa

#5 Post by avery_larry » 22 Jun 2009 11:38

Like this?

Code: Select all

set /p num=Enter the number of times you want to loop:
set count=1
:loop
cls
echo This is pass #%count% of %num%.
echo Press enter when the USB key is ready . . .
pause >nul
echo Put code here
set /a count+=1
if %count% LEQ %num% goto loop

Eagle710
Posts: 19
Joined: 29 Mar 2009 17:27

#6 Post by Eagle710 » 23 Jun 2009 06:37

Thanks. The code worked great.

Post Reply