Saved Bookmarks
| 1. |
Solve : Quotes around Directory with Spaces not working? |
|
Answer» I can't get my BATCH to work as needed: rmdir E:\Backup /S/Q MD E:\Backup XCOPY "C:\Documents and Settings\Chris" "E:\Backup" /f/i/r/h/y/s ECHO OFF cls ECHO * * * * * BACK-UP Complete * * * * * ECHO %date% - %time% PAUSE This does work though rmdir E:\Backup /S/Q MD E:\Backup XCOPY "C:\Icons" "E:\Backup" /f/i/r/h/y/s ECHO OFF cls ECHO * * * * * BACK-UP Complete * * * * * ECHO %date% - %time% PAUSE Any help would be great What do you mean when you SAY "doesn't work"? What actually happens? Quote from: contrex on August 26, 2007, 12:51:55 AM What do you mean when you say "doesn't work"? What actually happens?lol..was waiting for someone to ask that..Quote from: ghostdog74 on August 26, 2007, 02:49:22 AM Quote from: contrex on August 26, 2007, 12:51:55 AMWhat do you mean when you say "doesn't work"? What actually happens?lol..was waiting for someone to ask that.. As you will see elsewhere, this is the current "bee in my bonnet". Yes, it's difficult to diagnose a problem when there's not much else to go on besides, "I can't get my batch to work as needed". The more information and error information people give, the more high quality responses they'll get.Quote from: DeltaSlaya on August 26, 2007, 03:19:04 AM Yes, it's difficult to diagnose a problem when there's not much else to go on besides, "I can't get my batch to work as needed". You don't even get that in many cases. You just get "it doesn't work", which makes you wonder if cmd.exe has got corrupted in some weird and wonderful way that you never heard of before. I think many people suppose that computers should be able to do what they want them to do, rather than what they tell them to do. if you are really desperate try use the short name "C:\Docume~1\Chris"Sorry, I've isolated the problem and also changed the syntax a bit rmdir E:\Backup /S/Q MD E:\Backup MD E:\Backup\MyDocuments MD E:\Backup\Desktop XCOPY "C:\Documents and Settings\Chris\My Documents" E:\Backup\MyDocuments" /f/i/r/h/y/s XCOPY "C:\Documents and Settings\Chris\Desktop" E:\Backup\Desktop" /f/i/r/h/y/s ECHO OFF cls ECHO * * * * * BACK-UP Complete * * * * * ECHO %date% - %time% PAUSE the copy function of MyDocuments works FINE the Problem is when i try to copy anything from the desktop folder I get a PARSE Error. Quote from: contrex on August 26, 2007, 03:56:21 AM Quote from: DeltaSlaya on August 26, 2007, 03:19:04 AMi don't even bother thinking too much, after a while....Quote from: cfgcjm on August 26, 2007, 06:17:27 AMYes, it's difficult to diagnose a problem when there's not much else to go on besides, "I can't get my batch to work as needed". XCOPY "C:\Documents and Settings\Chris\Desktop" E:\Backup\Desktop" /f/i/r/h/y/s That's because Xvopy could not "parse" (i.e. interpret) the parameters that you gave it. The most common cause of this error is a missing quote, like in your posted command, at the beginning of the destination folder. |
|