Solved

Delete *xyz.jpg from entire drive

Posted on 2013-06-07
4
302 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 93

Accepted Solution

by:
John Hurst earned 400 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 100 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 93

Expert Comment

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

.... Thinkpads_User
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

I recently purchased an HP EliteBook 2540p notebook/laptop. It has two video ports on it – VGA and DisplayPort. HP offers an optional docking station for the 2540p that also has both a VGA port and a DisplayPort. There are numerous online reports do…
So many times I have seen the words written in a question "if only I could show you" or " I know how hard it is for you since you can't see it" in any zone. That has inspired me to write about this tool in windows 7 called "Problem Steps Recorder…
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
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…

856 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