?
Solved

Delete *xyz.jpg from entire drive

Posted on 2013-06-07
4
Medium Priority
?
311 Views
Last Modified: 2013-06-07
Does anyone know a way, preferably command line, to delete all files on a drive, including subdirectories, that fit the description *xyz.jpg?
0
Comment
Question by:hrolsons
  • 2
4 Comments
 
LVL 99

Accepted Solution

by:
John Hurst earned 1600 total points
ID: 39229790
DEL *xyz.jpg /S should do it.

Open Command, and run DEL /? to see the options.

.... Thinkpads_User
0
 
LVL 23

Assisted Solution

by:Thomas Grassi
Thomas Grassi earned 400 total points
ID: 39229849
I would also do this

del *xyz.jpg /s >c:\deleted.txt

this way you get a list of all the files you deleted
0
 
LVL 11

Expert Comment

by:Pradeep Dubey
ID: 39229859
Yes, you can do that with the del command and use /s switch for the deletion from sub-directories. below is the list of switch you may need further:

/P            Prompts for confirmation before deleting each file.
/F            Force deleting of read-only files.
/S            Delete specified files from all subdirectories.
/Q            Quiet mode, do not ask if ok to delete on global wildcard
/A            Selects files to delete based on attributes
attributes    R  Read-only files            S  System files
0
 
LVL 99

Expert Comment

by:John Hurst
ID: 39229876
@hrolsons - Thanks and I was happy to help.

.... Thinkpads_User
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
Suggested Courses
Course of the Month15 days, 8 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question