Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

marked as duplicate by Karan, Breakthrough, Journeyman Geek, Oliver Salzburg Jun 20 '13 at 17:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
    
It looks like you have some programming skills. You may ask programmers to help on that. It is very easy programmatically. Here is some articles: stackoverflow.com/questions/6003822/… –  Dilshod Jun 19 '13 at 17:02
    
@karan I don't believe the the questions are similar in their challenge! The solution I found is vastly different then anything those questions got so this alone should highlight the difference. I needed a solution that would work for a single task where as the other questions were looking for solutions that would constantly watch for the usb connected and the sync the flash drive. Thanks for your input though and maybe if people come here looking for a solution the other questions might help them more then mine! ~JT –  tyler Jun 20 '13 at 14:56
    
Your batch file seems to be doing pretty much the same thing, i.e. constantly polling for existence of a plugged-in USB drive. BTW, there's no guarantee all drives will be assigned the same drive letter. The best way to do this is using Task Scheduler or similar. For example, this question lists a few ways in the comments, and also mentions Event ID 20001 that should help. Anyway, as long as you're happy with your solution... –  Karan Jun 20 '13 at 16:50
1  
@Journeyman Geek - Can you describe the idea behind duplicates... If a question is similar it is considered duplicate? Take care - JT –  tyler Jun 20 '13 at 18:27

4 Answers 4

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

share|improve this answer
    
That's crazy expensive and I would have way more fun building something that would do this! :) Thanks for the post though never seen anything like this. –  tyler Jun 20 '13 at 14:43
    
I would encourage you to do the math and calculate your labor and time costs with and without a mass duplication device, once you do the math and show how much money you save, its pretty easy to get your betters to buy something like this. –  MDT Guy Jun 20 '13 at 14:48
    
Yes but I still have to connect the usb flash drives to this machine! Right now I essentially plug the flash drive in and then remove it. Really hard to do the math considering I don't know how efficient I would be with the device you suggested. Have you ever used one... After some more reading on it, this machine is built to be fast...So probably worth it if I was waiting on the files to transfer. –  tyler Jun 20 '13 at 15:03
    
shop around, but I know these devices sell for a reason, people buy them because they work. I'm assuming the key part here is that they all get written at the same time, this could cut your labor costs by a factor of 16. –  MDT Guy Jun 20 '13 at 15:05

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...

share|improve this answer
    
thoughts on how to know when the drive is recognized and completing the transfer when it is? Removing the pressing of y necessity in your example! –  tyler Jun 19 '13 at 15:19
    
No way to automatically do this from batch file. –  MB34 Jun 19 '13 at 15:24
    
Mind looking at the code I posted in my solution and giving me your thoughts! –  tyler Jun 20 '13 at 5:31
up vote 2 down vote accepted

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
share|improve this answer
    
Without actually testing it, that looks like it would work nicely. I would add a ~100 millisecond sleep command in the check: and wait: functions in order to keep processor usage down. –  David Jun 20 '13 at 14:09
    
excellent suggestion! I fixed the response to reflect your suggestion. –  tyler Jun 20 '13 at 14:37

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.

share|improve this answer
    
Any thoughts on how to know when the drive is recognized and completing the transfer when it is? –  tyler Jun 19 '13 at 15:20
    
I am not aware of any good way to do this, which is why I suggest plugging in the devices and waiting a while. –  David Jun 19 '13 at 15:53
    
Mind looking at the code I posted in my solution and giving me your thoughts! –  tyler Jun 20 '13 at 5:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.