Search found 3 matches
- 23 Apr 2008 07:03
- Forum: DOS Batch Forum
- Topic: Testing if folder exist when there are spaces in a path
- Replies: 3
- Views: 8719
- 17 Apr 2008 01:41
- Forum: DOS Batch Forum
- Topic: Testing if folder exist when there are spaces in a path
- Replies: 3
- Views: 8719
Testing if folder exist when there are spaces in a path
I am using following logic, but it fails if there are spaces in INIT_DIR variable (I use nul test to avoid errors when copying): if exist %INIT_DIR%Images\nul ( mkdir "%OUT_DIR%Images" xcopy /y "%INIT_DIR%Images" "%OUT_DIR%Images" >> %LOG% 2>&1 if ERRORLEVEL 1 &...
- 17 Apr 2008 01:31
- Forum: DOS Batch Forum
- Topic: Replace space in variable with %20
- Replies: 3
- Views: 16678
Replace space in variable with %20
I have difficulties with following:
set myPath="program files"
echo.%myPath: =%20%
%%20 or ^%20 doesn't work too.
It seems impossible to replace something by percent character
set myPath="program files"
echo.%myPath: =%20%
%%20 or ^%20 doesn't work too.
It seems impossible to replace something by percent character