Reputation: 13
I have a bat file like:
replace.exe Path1 Path2
Where Path1 and Path2 are folders paths with spaces like C:\Folder 1\ and C:\Folder 2\ So, the bat file look like:
replace.exe C:\Folder 1\ C:\Folder 2\
of course, because of the space in the both paths the argument are passes improperly.
How can I do this?
Update:
I try replace.exe %1 %2 in the bat file and pass the arguments in the cmd like:
Call replace.exe "C:\Folder 1\" "C:\Folder 2\"
this actually work. But I want to write the paths in bat file, not in the cmd windows.
Upvotes: 0
Views: 658
Reputation: 1106
Does
@echo off
set replace="C:\Folder 1\"
set with="C:\Folder 2\"
replace.exe %replace% %with%
work?
Upvotes: 1