Hi There,
I am given a folder path through an input, it comes in as %1 and prints the following;
C:\Folder1\Folder2\Folder3\Folder4
How can i ommit the first 3 paths (including the drive letter), printing just;
Folder3\Folder4
Any help you be appriciated,
Many Thanks
Alex
Truncating file path
Moderator: DosItHelp
Re: Truncating file path
Code: Select all
for /f "tokens=3* delims=\" %%a in ("%~1") do (set trunc=%%b)
echo %trunc%
hope **consored** will correct if I'm wrong
Re: Truncating file path
Works a charm!
Thanks alot
Alex
Thanks alot
Alex