by Murray | Oct 9, 2010 | MSDOS
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...
by Murray | May 3, 2010 | MSDOS
for /R %z in (*.zip) do unzip “%z” The DOS for command can simplify a lot. The above example will iterate over a file (you can specify delimeters & variables) and carry out an opertion of each item found. One I use a lot is; for %f in (.dll,.ocx) do...