2

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

3 Answers 3

1

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

3
  • 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, 2010 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, 2010 at 0:40
  • MSYS gives you a shell and utilities, Cygwin gives you a fake POSIX system.
    – Andrew
    Jul 2, 2010 at 5:37
2

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
0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .