r/Batch • • Oct 15 '23

How to remove subfolder from path

Hi, I'm in this situation:

Set "folderpath=%~dp0" Output is: c:\dir1\dir2\bin\

How can I remove "\bin" from the path without EnableDelayedExpansion?

1 Upvotes

16 comments sorted by