Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have batch file in "D:\run.bat". in this batch file i wanted to write a line so that whenever i run this file, a file should be created in the same folder with name "README.txt"

Example:-
batch file location
E:\run.bat
new file generated location
E:\README.txt

I am new to batch file. So please help
Posted
Updated 11-Jun-15 4:41am
v7

1 solution

The following should give you the path %~dp0

And to see more things you can do, use help call
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900