|(I posted the same post into the WIN7 forum, but I recognized later, that there is a forum specially for Programming, so I repost it. Hope you'll forgive me =p ) |
I need to get the folder name, where the batch is run from, as a var to work with later.
I nearly solved this Problem with one of the scripts from this side.
Now I use
for /F "delims=\" %%I in ("%CD%") do set e=%%~nI
to get the folder name. It does work... but not, if the Folder contains any [dot].
My folder structure is like
...\temp1\temp 2\temp 3.1.2\this.bat
but when I use the code mentioned before, I only get
temp 3.1Does anyone know, how to get the chars behind the last dot in the var as well?
Thanks and greetings