Re: Possible to search ALL except filetype?




<usenet@xxxxxxxxxxxxxx> wrote in message
news:ao0j145qpnfc1hp5ernoinjnqie8rdekf8@xxxxxxxxxx
On xp, is it possible to search a directory/subdirectory for all files
except a
certain type?

Like:
*.* NOT Kind:Pictures

Or I can narrow it down alittle bit or just put in the common .exts.

I dump alot of images onto DVDs. But I don't want all that 'trash' on the
disc.
I basically just want to search for everything BUT
'*.gif;*.jpg;*.png;*.bmp;...'
Pictures so I can just delete them from before creating my DVD.

There's usually hundreds of directories and subdirectories, with thousands
of
photos. It's quite inconvient to search for *.txt, delete. *.htm*,
delete,
thumbs.db, delete... etc. and that doesn't even guarentee I would catch
everything. Thumbnails.sues, .infs, ds_stores, macos file folders as well
as
possible *.baks or whatnot.

Sounds simple enough right? I know I can do this the LOOOONG way. I can
also
search for everything and sort by filetypes, then just delete groups of
files
that aren't the common picture types. But occassionally, when doing
50,60..100k+ file type search it slows my machine down quite a bit. Just
doesnt
make sense to do it that way if there's an easier way.

Suggestions?


To look for all files except certain types:
dir "d:\My Files" /s | find /i /v ".txt"

To delete all files of a certain extension:
@echo off
set Target=d:\My Files
set Extensions=.htm .txt .tmp .db
for %%a in (%Extensions%) do echo del /s "%Target%\*.%%a"

Remove the word "echo" in the last line to activate the batch file.


.



Relevant Pages

  • Re: problem with include.
    ... function inside the IF block that was icluded in common. ... posts automatically by running PHP script. ... echo "Updating existing topic...\n"; ...
    (comp.lang.php)
  • Re: problem with include.
    ... function inside the IF block that was icluded in common. ... posts automatically by running PHP script. ... echo "Updating existing topic...\n"; ...
    (comp.lang.php)
  • Re: If() action within print()..?
    ... >> Don't assume I didn't look for the asnwer before I posted. ... > echo 'class2'; ... >> well, gimme a break. ... common sense isn't all that common. ...
    (comp.lang.php)
  • Re: How to return user name in a script even if run by SUDO?
    ... common@common-laptop:~$ sudo echo $ ... Kapil Singh Kushwah ... _BEFORE_ executing sudo. ...
    (Ubuntu)