Select Page

Regular expressions in MS-DOS

If you have a path and filename and you want to extract the filename from the path then you can use the following regex: %~NXf e.g. for %f in (c:\temp*.pdf) do copy %f c:\pdffiles\%~nxf This will append only the filename to the final path. This is a bit of a...
%d bloggers like this: