
In Windows 8 and 10, you can navigate to Advanced System Settings in a similar way.

Script could be in many locations: F:\a.batĬ:\Users\Longusername\Desktop\Container\a.batĬ:\Users\Longusername\Desktop\Container\Dir1\fileAĬ:\Users\Longusername\Desktop\Container\Dir20\fileAĪnd right now the only options I have for output are ( %%~nxG): fileA.txt Maybe a solution would be to measure the length of the script's path and cut that off of the front of the full path? But I don't know how to manipulate that. bat file to live in a certain directory/path? I would like something - that doesn't have twenty characters of useless path info - that tells me which directory each duplicate file lives in. I'm running a recursive FOR /R loop which traverses sub-directories.

I've found drive letters, filenames, extensions, shortened (8.3) names, and full paths - but no relative paths.

How to split the filename from a full path in batch? How do I get relative directories / partial paths to display as echo output from a windows.
