Jump to content

Recommended Posts

Posted

Hello Everyone!

Does anyone know how to do it? What I want is a batch command that makes the batch file search f.ex, all *.bmp files and then removes them. How to?

Thanks in advance!

Marthax


Posted

It sounds too easy, what's the catch

Please explain, where you are wanting to perform the search, one drive, many locations, etc. Whether hidden and read only need including, not recommended; which OS is it to be compatible with and at what stage of setup you are wanting it to work.

Posted

What about the basic del command?

del /q /s /f C:\SomeDir\*.bmp

/q = Quiet mode, do not ask if ok to delete on global wildcard

/s = Delete specified files from all subdirectories.

/f = Force deleting of read-only files.

Posted (edited)

@Yzöwl: I want it to work on WinXP and it should execute with RunOnceEx. I know it sounds easy, but I just couldn't figured it out. Maybe I was to tired. There's no catch :P It's not supposed to search for hidden files.

@Nazgul: The problem with that command is that it'll search only in the "somedir" directory and not the rest. I want it to search the whole drive for a certain kind of files and delete them if it finds any.

EDIT: What happends if you type del "%systemdrive%\*.fileformat"? Will it work the way I want it?

Edited by Marthax

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...