I have a simple batch file named test.bat containing the following:
@echo off
cd ..\..
echo %~dp0
From the directory where the batch file is located I enter
.\test.bat
resulting in "Program 'test.bat' failed to run: The system cannot find the file specified At line:1 char:1 + DEV\vcpkg\test.bat"
This started when I tried to install vcpkg from github, which I've done on other machines without issue using the proven install files and instructions that comes with it. It seems the path elements are not working as expected.
In researching a solution I found https://stackoverflow.com/posts/27122098/ . Copying from it I've tried
.... To get clear understanding, let's create a batch file in a directory.
C:\script\test.bat
with contents:
@echo off
cd ..\..
echo %~dp0
When you run it from command prompt, you will see this result:
C:\script\
I'm getting the error, not the proper result.
I'm running as an administrator, and this is on an Azure hosted 64-bit VM running Windows Server 2012 R2. I've deliberately reduced it to as simple an executable as possible.
Ideas??