Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have posted this issue on StackOverflow but I thought this question might be a little more VMWare\Windows2008 server specific. Here's my question:

I have two VMware instances of Windows 2003. I am trying to run a batch file that starts running another batch file within its folder path. The script runs fine on one VM but on the other VM it fails to execute with the error:

The System cannot find the file specified

The script I am trying to run is script.bat:

start /d FOLDERNAME /b /WAIT AnotherScript.bat %~n0%~x0

I have put both my files within the same folder structure under the C:\ drive on both machines. The file AnotherScript.bat resides within FOLDERNAME on both the VMs.

It is not a permissions issue(?) since I show up as an administrator on both VMs.

I was wondering why would I get an unable to resolve relative paths on one machine vs. the ability to resolve it on another machine.


EDIT: Both the scripts are launching from the same directory and the %PATH% variables are the same and the cmd starts from C:\WINDOWS\system32\cmd.exe on both machines. None of this seems to be visibly different. Is there something else I should look into?

share|improve this question
Are these identical Windows 2003 versions, one isn't 64 bit perhaps? One thing you could try is to replace the start with echo on both systems to check that both systems are interpreting the parameters in exactly the same way. – Helvick Feb 3 '11 at 19:31
FOLDERNAME is not a path. Why block out the detail of that which could be vital in solving your problem? – JamesRyan Feb 3 '11 at 20:12
@Helvick - I followed your suggestion. Replacing the start with an echo gave me the same string on both machines. – sc_ray Feb 3 '11 at 20:25

I would suggest put PAUSE commands in the script to check what command it can't find.

share|improve this answer
Thanks but it seems like the script is unable to traverse the relative path to get to the AnotherScript.bat file. – sc_ray Feb 3 '11 at 19:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.