5

I have about 1,000 flash drives that I need to move a set of files onto. I'm looking for a way to reduce the amount of time this will take.

Thoughts: Attach task to the event of connecting flash drive. Run a bat file

xcopy /e /y c:\files_to_transfer\*.* .\dir_on_usb_drive

...

Any better ideas? I will just be plugging the Flash drive in and then taking it out putting next one in :-/

I would also like to reduce the amount of time spent on detecting device but I have no idea if this is even possible. All the flash drives are identical.

Thanks, Josh

Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311
tyler
  • 193

4 Answers4

3

So I wrote this bit of code that seems to work well. I'm open for scrutiny of it but it requires no key presses and allows me to simply plug the drive in and wait for the screen to tell me remove it.

@echo off
cls
:start
set choice=
xcopy /e /y W:\Desktop\transfer\*.* F:
goto wait

:check
timeout /t 1 /nobreak >nul
echo waiting
if exist F: (goto start) else goto check

:wait
timeout /t 1 /nobreak >nul
echo Waiting for removal
if exist F: (goto wait) else goto removed

:removed
echo removed
goto check
tyler
  • 193
2

Try using a batch file like this:

@echo off
cls
:start
set choice=
xcopy /e /y c:\files_to_transfer\*.* .\dir_on_usb_drive
set /p choice="Have you changed the Flash Drive? Press 'y' and enter for Yes: "
if not '%choice%'=='' set choice=%choice:~0,1%
if '%choice%'=='y' goto start

Don't forget to modify the source and destination...

MB34
  • 137
2

You should look into a USB duplicator if this is something you may have to regularly or ever again for that matter.

enter image description here

http://www.aleratec.com/1-16-usb-3-0-copy-tower-usb-duplicator-part-330110.html

MDT Guy
  • 3,727
1

If the size of the files you are copying is small, you might be able to get away with plugging in a few USB Hubs and waiting for all the drives the register in parallel.

Then create this script:

xcopy /e /y c:\files_to_transfer\*.* .\dir_on_usb_drive
xcopy /e /y c:\files_to_transfer\*.* .\dir_on_usb_drive2
xcopy /e /y c:\files_to_transfer\*.* .\dir_on_usb_drive3
etc.

Map it to a hotkey using AutoHotKey:

#c::Run script.bat

Your workflow would then be: plug in a bunch of drives, wait for them to register. Press Win+C, wait for copy. Repeat 200 times. Good luck.

David
  • 9,854