Solved

Delete *xyz.jpg from entire drive

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
command prompt wont close after executing batch file 11 47
CPU at 100% usage, why? 27 130
I suddenly cannot write to C drive 20 74
Internet Protocol Security question 3 71
OfficeMate Freezes on login or does not load after login credentials are input.
When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.

770 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