Act on a set of files at the Windows command prompt

If you've got to perform an action on a bunch of files at the command line, you want to master the for statement. The Daily Cup of Tech web site explains how the command:

for /R %z in (*.zip) do unzip "%z"

Iterates through all the zip archives in a folder and extracts them. If you're starting to get your feet wet automating tasks with batch scripts, this is a nice for primer. —Gina Trapani

Quickly Perform a Function on Several Files [Daily Cup of Tech]


Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <b> <i> <em> <strong> <cite> <blockquote> <a>
  • Lines and paragraphs break automatically.
  • Images can be added to this post.
  • Each email address will be obfuscated in a human readble fashion or (if JavaScript is enabled) replaced with a spamproof clickable link.

More information about formatting options

To combat spam, please enter the code in the image.