Jump to content

[Batch] Looking for one command to delete multiple files in a folder.


Recommended Posts

HI :)

Is it possible to only delete same files in a folder with only one command line.

Exemple

DEL /Q "C:\test\folder\" file1.inf, file2.gif, file3.sys ...

Or:

DEL /Q "C:\test\folder\"

file1.inf

file2.gif

file3.sy

......

Or:

DEL /Q "C:\test\folder\" "a_list_of_filenames_for_deleting.txt"

I couldn't not find anything in goolge :(

Link to comment
Share on other sites


Depends on the OS, but you should be able to run del /q /f <file list separated by spaces>. Note that if you do this, however, folders will NOT be deleted - rd must be used on directories/folders to delete them. However, this works just fine on files.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...