PDA

View Full Version : Batch File problem ?


Rick_280680
03-30-2007, 12:45 PM
Hello,
Im trying to write a batch file to copy files from a Network Drive to a Pocket PC.
When i run it, it says 'R:\GOLD' is not recognized as an internal or external command, operable program or batch file.

What have i done wrong - i've pasted the text from the batch file below.

Thanks !


REM: DO NOT EXECUTE UNTIL ACTIVESYNC IS CONNECTED

R:\GOLD CUSTOMER SOFTWARE\CECOPY.exe "R:\GOLD CUSTOMER SOFTWARE\TNT UK LTD\MC9094\UK000281-015 (Sterling)\MC9094 Universe 2.1.0.38\Universe_2.1.0.38\UpdateRegMergeSymbol.re g" dev:\application\UpdateRegMergeSymbol.reg
PAUSE

REM: REMOVE TERMINAL FROM THE CRADLEcefile|path>
For some reason it didnt show all the text ...

REM: DO NOT EXECUTE UNTIL ACTIVESYNC IS CONNECTED

R:\GOLD CUSTOMER SOFTWARE\CECOPY.exe "R:\GOLD CUSTOMER SOFTWARE\TNT UK LTD\MC9094\UK000281-015 (Sterling)\MC9094 Universe 2.1.0.38\Universe_2.1.0.38\UpdateRegMergeSymbol.re g" dev:\application\UpdateRegMergeSymbol.reg
PAUSE

REM: REMOVE TERMINAL FROM THE CRADLEcefile|path>

kencan
03-30-2007, 01:45 PM
If you are running Windows, select "Run" from your START menu. Type cmd.exe and press enter

In the DOS prompt, go to main directory of your R: drive.
Type
dir /x

You will see there is another name for "GOLD CUSTOMER SOFTWARE". Should be something like "GOLDCU~1". Use this 8 character directory name rather than long filename in your batch file.

Gopinath M
03-30-2007, 02:45 PM
Try running it in cmd not command

because cmd is window based
command is kept for compatibility. It is just like dos. it uses 8.3 format. i.e the length of the file should be 8 and the extension should have a length less than or equal to 3.

When the name of the file is greater than 8 characters it converts them to 8.3 format by truncating the characters.

eg. if the file name is gopiisafool.txt
then the name in 8.3 format is gopiis~1.txt