Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying different files to Flash Drives 2

Status
Not open for further replies.

tviman

Programmer
Jul 25, 2002
2,123
US
In the near future I will have the need to copy a different file to a USB flash drive. To explain - I have, for example, 1000 different files and each file needs to be copied to a different flash drive. Is there software/hardware that I can automate to perform this operation. I envision a USB hub loaded with empty flash drives and using some kind of merge program that will copy each file to a specified USB port. This is NOT duplicating a single file to multiple flash drives but rather different files to different flash drives. Thanks in advance for any helps of ideas.
 
Is this something like: you have 1000 different files on your HD, and you want all *.txt files going to FlashDriveA, all *.jpg files to FlashDriveB, etc.?
Or, all files between 1/1/2022 to 3/1/2022 going to FlashDriveA, all files between 3/2/2022 to 5/1/2022 going to FlashDriveB, etc.?

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson
 
You had better specify exactly what your goals are first - very explicitly. Before you start blasting files around. The whole concept sounds like kind of an ill-advised exercise though to me. Remember that flash drives are NOT as reliable as you might hope they might be. Counting on them to transport files or back up files is not the best method unless the recipient cannot access them any other way.
 
Quite apart from the concurrent USB device connection limit of 127 devices at any one time (by which time you will long have run out of available drive letters), I suspect you're going to quickly run into the Windows 'USB enumeration' bug whereby the registry has a limit of how many enumeration records it can hold of USB device connections (i.e. time, date, hub, port, device type [e.g. 'mass storage'], device name, PID/VID, manufacturer, serial no. [if present], transfer speed and other capabilities [e.g. hot unpluggable], etc.).

The problem is that Windows records every connection of a USB device (even via a 'passthrough' device like an external USB hub) and stores the info away in the registry... but never, ever removes the information, even when the device is disconnected. As such, they're classic registry artefacts that forensic investigators rely upon (much like 'ShellBags' entries since Windows 7). Even if all you do is move a USB stick from one USB port to another, a whole new set of entries is collected and stored... even though the only real hardware 'change' is the port used.

Once the (un-documented) enumeration limit is reached you'll end up increasingly with 'Unknown Device', 'Device not recognised', 'No drive letter assigned' or perhaps just the Windows 'Connect' sound but no appearance of the USB stick in 'File Explorer'. Once that happens you'll have no option but to start clearing out the contents of the USB and USBSTOR sub-keys under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ used to store enumation info.

Google something like Unknown USB Device (Device Failed Enumeration) to get a better idea of the scale of the problem... and note that the bug doesn't just affect Windows 10/11 as many of the results suggest. Note also that many of the results incorrectly point the finger at corrupt USB drivers (?), missing 'Windows Updates' (?) and even mainboard issues (?).

AFAIK the USB 'enumeration limit' bug is solely a Windows issue, was introduced with Windows Vista, has never been addressed by Microsoft and has become more noticeable (and reached quicker) now additional info about USB3 (driver/transfer speed/capabilities, etc.) is stored. It's even worse if you're configuring multi-capable devices like SatNavs or Apple iPhones, iPads and iPods as these have multiple modes and store far more registry entries per device.

As a result, the only effective 'fix' I know of is really just a temporary workaround... the issue will re-occur at some point in the future as more USB devices are connected/disconnected. For example, see this post from two days ago.

Hope this helps...
 
Thanks for the enumeration info Rick998. I was not aware of this. Does Unix have the same enumeration issue? Andrzejek - the issue is I have 1000 separate files named 1.txt through 1000.txt, for example. I want file 1.txt on one flash drive, 2.txt on the next flash drive, 3.txt on the third flash drive, and so on. Each flash drive will have just one, unique file. Looks like I'll have to re-think this issue.
 
tviman said:
Looks like I'll have to re-think this issue.

I agree. [thumbsup2]
So, you have a 1000 txt files, and (originally) you wanted to have a single txt file on each of the 1000 flash drives. That's a LOT of flash drives.

If you state - in simple terms - what you want to achieve, I am sure there are other alternatives to a 1000 flash drives...

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson
 
@tviman - I'm not aware of any other OS having the same USB enumeration issues.
 
Don't take this the wrong way, but that seems very OCD to me, never mind impractical and expensive. What is the motivation behind this desire? Why only one file per memory stick? This boggles my limited mind.
 
>connection limit of 127 devices

Heh. yes, well - given that this is really endpoints, rather than devices, and that most USB devices use two endpoints, and USB hubs generally take 4 - this is really closer to about 50 to 60 actual physical devices per root hub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top