Re: Batch file works in command line but not as a batch
- From: Bob I <birelan@xxxxxxxxx>
- Date: Fri, 01 Feb 2008 12:52:07 -0600
You need quotes around path names with spaces.
Danger wrote:
This batch file is a simple rename of a file folder I can run it on the command line and it works, In a batch file it can not find the file name.
the code _____________
C:
cd C:\Documents and Settings\%USERNAME%\Application Data\Research In Motion\BlackBerry
IF Exist intellisync-old (rd /s /q intellisync-old) ELSE (ECHO SUCESS)
PAUSE
ren intellisync intellisync-old
pause
___________________
the result
C:\Documents and Settings\Administrator\Application Data\Research In Motion\Blac
kBerry>IF Exist intellisync-old (rd /s /q intellisync-old ) ELSE (ECHO SUCESS )
SUCESS
C:\Documents and Settings\Administrator\Application Data\Research In Motion\Blac
kBerry>PAUSE
Press any key to continue . . .
C:\Documents and Settings\Administrator\Application Data\Research In Motion\Blac
kBerry>ren intellisync intellisync-old
The system cannot find the file specified.
C:\Documents and Settings\Administrator\Application Data\Research In Motion\Blac
kBerry>pause
Press any key to continue . . .
_____________________________________
the file folder with the correct name is in the correct dir
Thank you in advance,
.
- Follow-Ups:
- References:
- Batch file works in command line but not as a batch
- From: Danger
- Batch file works in command line but not as a batch
- Prev by Date: Re: Should I worry at all about Local Profile Size?
- Next by Date: Re: How can I restore full system from a backup
- Previous by thread: Batch file works in command line but not as a batch
- Next by thread: Re: Batch file works in command line but not as a batch
- Index(es):
Relevant Pages
|