Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Can anyone recommend a utility (hopefully cheap/free) that will allow me to search across multiple cifs shares for multiple file name/types and then delete them? We are running into problems with our users saving files they aren't supposed to be and want to "clean house".

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

If you have a Linux machine you can mount the cifs shares on, then the "find" utility will do the job. E.g.,

find /path/to/share -name "*.xyz" -delete

Or leave out the -delete to see what files you're finding first, or "man find" to see what other options you have.

Most Linux machines will have "find" already installed, but if not it might be in a package called "findutils" or "coreutils".

share|improve this answer
    
While it's always a good idea to install Linux ;-), it's not necessary to use find. There are various Windows ports of find, e.g. GnuWin32: gnuwin32.sourceforge.net/packages/findutils.htm –  sleske Jul 1 '10 at 23:03
    
Oh, good point. I'm not familiar with GnuWin32, but I used to be a fan of Cygwin ( cygwin.com) when I used Windows. A newer suite called MSYS ( mingw.org) seems to make people happy too; it's supposed to integrate better than Cygwin with the rest of your Windows system. Both of them appear to have "find". –  Greg Price Jul 2 '10 at 0:40
    
MSYS gives you a shell and utilities, Cygwin gives you a fake POSIX system. –  Andrew Jul 2 '10 at 5:37
add comment

this works on windows hosted cifs shares
The following will work and it executes locally to the server. Must be run with admin priv's.

wmic /node:servername datafile where "extension='mp3'" call delete

please test this for yourself

also note this works

wmic /node:servername datafile where "extension='mp3' and extension='avi'" call delete
share|improve this answer
add comment

Try FlexTk's file organizing capabilities. It's not free, but you can try to get job done in 30 days as they provide a free 30-days trial.

You can define multiple rules-action pairs specifying operations to perform on specific types of files.

First try it in the preview mode and once you will be happy with the accuracy, you can use the stream mode or the FlexTk command line tool to execute predefined file organizing operations automatically.

More info is here:

http://www.flexense.com/flextk/file_organizing.html

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.