Solved

Delete *xyz.jpg from entire drive

Posted on 2013-06-07
4
299 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 90

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 90

Expert Comment

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

.... Thinkpads_User
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Hi Friends, These registry tweaks will help you optimizing your Windows 7 system for any VDI. This will improve the machine performanance and can be used on normal systems also. These are few registry tweaks which will add value by enhancing the …
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup". After a while, you have entered a loop for Auto repair which does not fix anything and you will be in a  panic as all your work w…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. 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…

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now