![]() replace with no parameters says "source path required" "no files replaced"Įxactly the same effect when they're in folders with spaces.Ĭ:\>cmd /c "c:\Program Files\my folder\replace.exe" > "c:\temp\spaces are here\r.r"Ĭ:\>"c:\Program Files\my folder\replace.exe" > "c:\temp\spaces are here\r.r" C:\>cmd /c "c:\Program Files\my folder\my long program.exe" > "c:\temp\spaces are here\a.a"įurther example demonstrating it works with "my long program.exe", removing cmd /c, it operates fine too.Ĭ:\>"c:\Program Files\my folder\my long program.exe" > "c:\temp\spaces are here\Īnother example, but with replace. cmd.exe /C "C:\Program Files\Somewhere\SomeProgram.exe" > "C:\temp\Folder Containing Spaces\SomeProgram.out" I think you'll find that your example works absolutely fine as it is. Remove the last quote character on the command line, preserving Otherwise, old behavior is to see if the first character isĪ quote character and if so, strip the leading character and the string between the two quote characters is the nameĢ. Where special is one of: there are one or more whitespace characters between the no special characters between the two quote characters, If all of the following conditions are met, then quote characters The switch is processed as a command line, where the following logic is If /C or /K is specified, then the remainder of the command line after Is there away around the strange quote processing that cmd.exe uses? I want it to preserve all of the quotes, but there doesn't appear to be an option to make it do that. I can do this successfully: // quotes not required around folder with no spacesĬmd.exe /C "C:\Program Files\Somewhere\SomeProgram.exe" > C:\temp\FolderWithNoSpaces\SomeProgram.outīut, I really need the first one to work. I'm guessing cmd.exe strips some quotes which makes the statement ill-formed. If you read the help for it, it handles " characters in a special way. ![]() However, I have problems which are down to the way cmd.exe works. I'm trying to do this: cmd.exe /C "C:\Program Files\Somewhere\SomeProgram.exe" > "C:\temp\Folder Containing Spaces\SomeProgram.out"
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |