windows - Batch script issue with the current directory -


I have used a batch file in which I am setting the full path variable below

< Strong> code snippet (batch file: brk_validation.bat)

  SET ABS_PATH =% ~ dp0 echo% ABS_ PATH% assumed the values ​​of files   

Run the batch program at the command prompt:

  D: \ files & gt; brk_validation.bat. Verification of files completed   

Output:

  D: \ Files \   

Problem:

I have put the batch file in a separate directory and then the bat file is running after giving it the full path as shown below:

  D: \ Files & gt; D: \ work \ brk_validation.bat. Verification of files in   

Output:

  D: \ work \   

Expected output:

  Validated the files contained in D: \ files \   

I want the path where the files are present i.e. D: \ files for example above.

So any help is appreciated. Thanks!

/ Code>

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -