|Im trying to copy and rename file by its original path:|
%%v - holds the original path of the file (before i copied it to "tmptxt" folder, and its changing.
FOR /F "tokens=* delims=\&." %%A IN ("%%v") DO copy c:\tmptxt\*.txt p:\TXTFiles\%%X%%Y.txt
i would like to name the file this way:
but the path lenght might change, for example:
the last two folder will alwayes be a number and then a letter.
but i can not find a way to reffer to the right token (in the example i used X and Y - but they will change each time)