Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How to Use Multiple Extentions  (Read 2253 times)

0 Members and 1 Guest are viewing this topic.

NvrBst

  • Guest
How to Use Multiple Extentions
« on: December 10, 2008, 03:06:36 PM »
Is it possible to list multiple extentions to match in a single command, or do I need to use multiple commands in a batch file, && operator?  For example something like:

dir /S (*.log | *.txt)

which would list all "*.log" or "*.txt" files, or for example something like "del *log | *.txt"?

Dias de verano

  • Guest
Re: How to Use Multiple Extentions
« Reply #1 on: December 10, 2008, 03:45:39 PM »
Use a semicolon and a space to separate the file masks

e.g. to find all log and txt files in this and sub folders:

Code: [Select]
dir /s *.log; *.txt
and to delete all log and txt files:

for /f "delims==" %%F in ('dir /b /s *.log; *.txt') do del "%%F"