| 1. |
Solve : Move syntax help (batch file)? |
|
Answer» hi i'm creating a batch file where i wanted to move all html FILES into another folder and then delete it, however i'm having problem with the move syntax. please tell me how to fix it. below is the code, thanks hi i'm creating a batch file where i wanted to move all html files into another folder and then delete it, however i'm having problem with the move syntax. please tell me how to fix it. below is the code, thanks first, create c:\delete with md c:\delete then write move "C:\Program Files\2BrightSparks\SyncBack\*.html" c:\delete that is, with the " signs and afaik this should be it guys i already try Move /y "C:\Program Files\2BrightSparks\SyncBack\*.html" "C:\delete" and Move /y "C:\Program Files\2BrightSparks\SyncBack\*.html" C:\delete none of them works, and i already have a folder name delete in my C drive.For what do you need the /y switch? uliThe /Y switch silences the prompt from displaying "Moving XYZ.ABC" on the screen, thus making the file run more clearly. However, this is a disaster in testing mode. Try the command without the /Y switch. Then check the C:\delete directory to ensure that the file is there. Report back on what happens, along with any error messages. Tip #1 of batch files: Make it work, then worry about hiding the behind-the-scenes details. well ... when i use these [Move "C:\Program%20Files\2BrightSparks\SyncBack\*.html" C:\delete] syntax it give me the error [The system cannot find the path specified.] when i use these [Move "C:\Program%20Files\2BrightSparks\SyncBack\*.html" "C:\delete"] syntax it give me the error [THe system cannot find the path specified] when i use these [Move C:\Program%20Files\2BrightSparks\SyncBack\*.html C:\delete] syntax it give me the error [Invalid Syntax]"C:\Program Files\2BrightSparks\SyncBack\*.html" Why are you inserting %20? Your browser will understand that. Dos will think its part of the directory name. If it doesn't work as typed above, try changing to the CONTAINING directory before invoking the move command. Quote "C:\Program Files\2BrightSparks\SyncBack\*.html" yes, what has the %20 (space) syntax to do with that ? Imho you just go move "C:\Program Files\2BrightSparks\SyncBack\*.html" c:\delete since no quote marks are necessary around delete and if the delete dir exists, either your path isn't quite right, or there really are no html files in C:\Program Files\2BrightSparks\SyncBack\ to move yet |
|