Possible to search ALL except filetype?

U

usenet

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?
 
P

Pegasus \(MVP\)

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

usenet

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.

Thanks. The batch file does what I'm looking for. Still no easy way of
searching tho right? Doing it that way, still have to do each .ext when I do
not know of every extension that could exists. Is there no way of searching
this way with windows xp search tools(companion)?

BTW, is there a switch for del to del system and hidden files as well?
del /f only removes read-only, which some files are for me. But thumbs.db is a
system/hidden file so batch wouldnt catch them.
 
P

Pegasus \(MVP\)

Thanks. The batch file does what I'm looking for. Still no easy way of
searching tho right? Doing it that way, still have to do each .ext when I
do
not know of every extension that could exists. Is there no way of
searching
this way with windows xp search tools(companion)?

BTW, is there a switch for del to del system and hidden files as well?
del /f only removes read-only, which some files are for me. But thumbs.db
is a
system/hidden file so batch wouldnt catch them.

In your original post you said you wanted to search for ALL files
EXCEPT certain file types, and delete those. This is what the batch
file does. Are you now turning your question into its opposite: To
look for CERTAIN files and preserve them, then delete the rest no
matter what?

Have a look at the output from del /? to see all available switches.
 
H

HeyBub

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.

Try Agent Ransack (free). Much faster and more flexible.
 
U

usenet

In your original post you said you wanted to search for ALL files
EXCEPT certain file types, and delete those. This is what the batch
file does. Are you now turning your question into its opposite: To
look for CERTAIN files and preserve them, then delete the rest no
matter what?

Have a look at the output from del /? to see all available switches.

My original post and this should mean the same thing. If I said it wrong,
sorry. I want to delete all files that are not .jpg, .gif, .png, .... basically
anything that's not pictures. There are a few more extentions, uncommon, but
pictures nonless.

So either I search for everything and delete those 'other' files. Or preserve
the pictures. The 2nd post is the same thing. Since I do not know what other
filetypes exist, it makes it hard to search (with the batch file) for just those
specific file to delete.

It's alot simplier to list out all the extentions I want to keep (since there's
only a finite number of formats) then to list out ALL the extentions I want to
delete (possibly infinite number of filetype .ext). Does that make more sense?
dir "d:\My Files" /s | find /i /v ".txt"
That works if I do it for each file format, but it still does not help in the
end. Doing it for each type .ext is possible, but wouldnt help with the final
goal.

Are there any decent file search tools on XP avilable for this? Vista did this
task perfectly, NOT Kind: Pics I believe. There was a whole lot of other issues
with vista which is why I'm back to XP tho.
 
B

Bill in Co.

You can get third party search tools that are a lot better than those built
into XP. Two such examples are Agent Ransack (free), and FileLocator Pro
(more featured, big brother to Agent Ransack, but not free)
 
U

usenet

Try Agent Ransack (free). Much faster and more flexible.

Thank you. I just gave it a try. It's absolutely perfect for what I am looking
for. It's even better then what I could have asked for. I always loved regular
expressions when tring to fine tune 'searches' in just about anything.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top