Reader Challenge June 2010

A batch file is used to copy the local Documents folder to two locations for backup purposes. A user adds a line to the batch file so that his Documents folder would also be copied to an 8GB flash drive, which results in an error message. What went wrong?

Kathy Ivens

June 15, 2010

2 Min Read
ITPro Today logo

The June 2010 Challenge

I use a batch file to back up local documents because restoring an individual file that was inadvertently deleted is much faster than finding a file in an enormous single backup file. The batch file copies the user's Documents folder and has the necessary switches to recognize new subfolders, force the copying of read-only files, skip open files, and eliminate user participation ("are you sure...."). The batch file is added to Scheduled Tasks. I try to have the files copied twice: once to a folder on another computer on the network (usually a server that is, in turn, backed up nightly) and once to a folder on an attached drive or NAS drive. (Clients are told to copy the contents of the target to a CD or DVD weekly and take the disk offsite.)

A client wanted the existing batch file to copy his Documents folder to a third location—an 8GB flash drive—so that he could work on documents at home. So, he added another line to the file, copying the existing command and changing the target to the flash drive (in this case, G:). When he ran the batch file, copying stopped with a "File Creation Error" before the entire contents of his Documents folder had been copied. Do you know what caused this and how to fix it?

 

Answer

Flash drives are formatted with the FAT32 file system, and you can't have more than 512 files/folders on the root. Many users have a thousand or more documents in their Documents folder. (Most users never clean out their documents, and many users don't create subfolders for various categories of documents. Finding a document must be a whole lot of fun.) To avoid the error, you must specify a folder as part of the target, e.g., G:Backedupdocs.

 

June 2010 Reader Challenge Winner

Congratulations to Harvey Kaye of Ontario, Canada, the winner of our June 2010 Reader Challenge. He wins a copy of Windows 7: The Definitive Guide from O'Reilly Media (www.ora.com).

 

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like