Hi.
I would have thought this was simple, but I'm stuck. Probably missing something simple.
I want to search through my whole music directory, including all subfolders, for any files that do NOT match the *.mp3 search.
Whats the easiest way?
Search for files that do NOT match a search term.
-
- StarLounger
- Posts: 71
- Joined: 20 Feb 2010, 10:31
- Location: UK
Search for files that do NOT match a search term.
thanks, Paul.
-
- Administrator
- Posts: 78487
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Search for files that do NOT match a search term.
I don't know how to do this with the standard Start | Search option in Windows XP. You can do it in a command prompt window, for example
dir "C:\Documents and Settings\<username>\My Documents\My Music" /s | find /v /i ".mp3"
The first part dir ... /s lists all files in the specified folder and its subfolders.
The pipe character | passes the results to the second part find /v /i ".mp3"
The /v parameter specifies that find should look for lines NOT containing the search text ".mp3".
The /i parameter specifies that the search is not case sensitive. Without this, Hey Jude.MP3 would still be found because the extension is upper case.
dir "C:\Documents and Settings\<username>\My Documents\My Music" /s | find /v /i ".mp3"
The first part dir ... /s lists all files in the specified folder and its subfolders.
The pipe character | passes the results to the second part find /v /i ".mp3"
The /v parameter specifies that find should look for lines NOT containing the search text ".mp3".
The /i parameter specifies that the search is not case sensitive. Without this, Hey Jude.MP3 would still be found because the extension is upper case.
Best wishes,
Hans
Hans
-
- StarLounger
- Posts: 71
- Joined: 20 Feb 2010, 10:31
- Location: UK
-
- 3StarLounger
- Posts: 246
- Joined: 09 Feb 2010, 09:01
- Location: Southeast England
-
- StarLounger
- Posts: 71
- Joined: 20 Feb 2010, 10:31
- Location: UK
Re: Search for files that do NOT match a search term.
Ok, have finished my script to perform this type of search. It gives a textfile output which it plonks on the desktop.
I think it's error free now... seems to work perfectly for me.
The DIR cmd is very handy to know, but sifting through the verbatim was tedious! This gives me a nice concise report.
Thought to share it, if helpful.
I think it's error free now... seems to work perfectly for me.
The DIR cmd is very handy to know, but sifting through the verbatim was tedious! This gives me a nice concise report.
Thought to share it, if helpful.
You do not have the required permissions to view the files attached to this post.
thanks, Paul.
-
- Administrator
- Posts: 78487
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands