C:\>for /d %I in (*) do @echo %~sI
C:\APACHE~1.27
C:\BD630A~1
C:\Dell
C:\DOCUME~2
C:\DOCUME~1
C:\Drivers
C:\local
C:\oracle
C:\PROGRA~1
C:\Temp
C:\WINDOWS
C:\>VER
Microsoft Windows XP [Version 5.1.2600]
Oh well, at this point I think it is the best to post the script so you will understand why it is quite hard to implement:
SET /P SOURCE=Drag and drop the image to be altered (SOURCE):
SET /P toreplace=Drag and drop the pattern to be searched for (MATCH):
SET /P replacingpattern=Drag and drop the pattern that will replace the searched pattern (REPLACE):
set SRC="%SOURCE%"
set SUB="%toreplace%"
set REP="%replacingpattern%"
the variable paths SOURCE, toreplace and replacingpattern are what I need to work with spaces.