Script directory url
Posted: 24 Aug 2011 15:15
Hi,
I need to get url of directory where is my batch script.
Example:
displays:
but I need:
so here is my question - how can I do that?
%dir% is not that what I want. If I drag and drop any file to my batch script, itself value is url to file that I drag and drop, not url to batch script.
Hope you understand what I'm talking about - my english is soooo baaad : ]
ps I thought to split a string, extract substrings by delimiter, etc, but I think there is simpler way.
I need to get url of directory where is my batch script.
Example:
Code: Select all
echo %0
displays:
C:\Users\kkuba\Desktop\test.bat
but I need:
C:\Users\kkuba\Desktop\
so here is my question - how can I do that?
%dir% is not that what I want. If I drag and drop any file to my batch script, itself value is url to file that I drag and drop, not url to batch script.
Hope you understand what I'm talking about - my english is soooo baaad : ]
ps I thought to split a string, extract substrings by delimiter, etc, but I think there is simpler way.