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
Post a Comment