Saved Bookmarks
| 1. |
Solve : Problem with XCOPY? |
|
Answer» Yeah! I got a little carried away trying to prove a point. 2. One or more . (dots) can represent a directory. Most of the time a single dot will be treated the same as *.*, but not always. Sometimes *.* will work and . does not. And other times . will work when *.* does not. I don't have a hard and fast rule on when and where, but if *.* doesn't work, TRY DOT. Sometimes the DOT is the only way to get DOS to recognise a directory. The root directory is the primary example. There are at least 2 commands ( RD & Subst) that require a directory name that, when you want to specify the root directory, the only way that works is "[driveletter]:\." (true at least in XP pro) I learned through trial and error that to be true, and there are other places that the DOT will work better. If you GOOGLE search for the dot directory, most of the references are from Linux users. Apparently the use of the dot directory is more widely used in Linux than DOS/Windows, but there are times in DOS also when it it invaluable. On the following blog, Martin Zugec acknowledges that the dot is better than the nul. Martin Zugec blog EDIT 05/30/2008 08:47 PM EST (In your case, I first recommended (without testing) adding the "dot" in the destination path Code: [Select]xcopy /E "C:\Flash_Copy\temp" %DriveLetter%:\.After testing it myself, I found that the secret to getting the command to work was in completing the source path as follows. In this case the *.* worked better than the single dot Code: [Select]xcopy /E "C:\Flash_Copy\temp\*.*" %DriveLetter%:\*.* For whatever unknown reason , the source path without the \*.* is OK for Xcopy if the drive has not been formatted just prior, but after a drive was formated, the Xcopy needed a complete source path for it to work. Why did Xcopy require a more complete command line after the format? I can't tell you. But: Quote from: llmeyer1000 on May 23, 2008, 02:50:22 AM It's best not to ASSume that DOS will be able to figure out exactly what you want to do.Rehashing this from more than a YEAR ago: Thank you so much for this solution: Quote from: llmeyer1000 on May 23, 2008, 02:50:22 AM
It just helped me solve a problem I had at the end of a long work project. I had written a little tool to update flash drives automatically and it all worked fine in one folder. Now I wanted to use it for new content I had CREATED and boom! Error. I had no idea what the problem was until I found this topic. Thanks, llmeyer |
|