A Windows Vista forum. Vista Banter

Welcome to Vista Banter.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to ask questions and reply to others posts, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

Go Back   Home » Vista Banter forum » Microsoft Windows Vista » Windows Vista File Management
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Windows Vista File Management Issues or questions in relation to Vista's file management. (microsoft.public.windows.vista.file_management)

Searching for files by attributes



 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old February 27th 08, 01:56 AM posted to microsoft.public.windows.vista.file_management
Ray[_6_]
external usenet poster
 
Posts: 66
Default Searching for files by attributes

When I use Vista's "advanced search" function, I can specify location,
date, size, name, tags, and author. Is there any way to search by file
attributes, e.g., to find all files with the archive bit set?

--
Ray
(remove the Xs to reply)
  #2 (permalink)  
Old February 27th 08, 04:22 AM posted to microsoft.public.windows.vista.file_management
Brink
external usenet poster
 
Posts: 1
Default Searching for files by attributes


Ray;626811 Wrote:
When I use Vista's "advanced search" function, I can specify location,
date, size, name, tags, and author. Is there any way to search by file
attributes, e.g., to find all files with the archive bit set?

--
Ray
(remove the Xs to reply)


Hi Ray,

You can do a search for all files using the file name "*.WMA" (no
quotes) for example. Just add a * in front of the file extension to get
all file names with that extension in the selected search location.

Here are some other great Search tips if your interested.

'Windows Vista Team Blog : Advanced search techniques'
(http://windowsvistablog.com/blogs/wi...echniques.aspx)

Hope this helps,
Shawn


--
Brink

*There are no dumb questions, just the people that do not ask them.*
'*Vista x64 Forums*'
(http://www.vistax64.com/index.php?referrerid=2980)
*Please post feedback to help others.*
  #3 (permalink)  
Old February 27th 08, 04:30 AM posted to microsoft.public.windows.vista.file_management
Keith Miller \(MVP\)
external usenet poster
 
Posts: 310
Default Searching for files by attributes

Hmmm....After some testing, it seems the easiest way is to use the command
prompt:

dir /aa (for archive bit)

In Search, I tried various combinations of attribute:A, attribute:="A",
attributes:~"A" etc. with no luck. I then took a more general search (all
files in a specified folder) and then used the 'Attributes' column header to
filter the view -- I used the 'R' attribute, since almost every file has the
Archive attribute set. I then saved the saved the Search & opened the saved
Search in Notepad (saved Searches are XML files). Amidst the other info,
here is the essential part:

condition
type="leafCondition"
property="System.FileAttributes"
propertyType="uint32"
operator="eq"
value="17"attributes/
/condition

So, if I want to search for files & folders with the read-only attribute
set, I need to type:

system.fileattributes17 OR 1)

NOT VERY INTUITIVE, EHHH?!?!?!?

An internet search for 'system.fileattributes' yielded the following
reference for the numeric value of the various attributes:

http://msdn2.microsoft.com/en-us/lib...40(VS.85).aspx

So for occasional searching, I would use the command prompt or add the
attributes column & filter on that column. If you need to regularly
manipulate files based on attributes, you might want to check out
PowerShell:

http://www.microsoft.com/windowsserv...l/default.mspx


--
Good Luck,

Keith
Microsoft MVP [Windows Shell/User]



"Ray" wrote in message
...
When I use Vista's "advanced search" function, I can specify location,
date, size, name, tags, and author. Is there any way to search by file
attributes, e.g., to find all files with the archive bit set?

--
Ray
(remove the Xs to reply)


  #4 (permalink)  
Old February 27th 08, 09:15 PM posted to microsoft.public.windows.vista.file_management
Ray[_6_]
external usenet poster
 
Posts: 66
Default Searching for files by attributes

" Keith Miller \(MVP\)" wrote:

Hmmm....After some testing, it seems the easiest way is to use the
command prompt:

dir /aa (for archive bit)


I agree that's the easiest way.

In Search, I tried various combinations of attribute:A,
attribute:="A", attributes:~"A" etc. with no luck. I then took a
more general search (all files in a specified folder) and then
used the 'Attributes' column header to filter the view -- I used
the 'R' attribute, since almost every file has the Archive
attribute set. I then saved the saved the Search & opened the
saved Search in Notepad (saved Searches are XML files). Amidst
the other info, here is the essential part:

condition
type="leafCondition"
property="System.FileAttributes"
propertyType="uint32"
operator="eq"
value="17"attributes/
/condition

So, if I want to search for files & folders with the read-only
attribute set, I need to type:

system.fileattributes17 OR 1)

NOT VERY INTUITIVE, EHHH?!?!?!?


Not terribly, but it's a little simpler for my case; the value is just
32.

An internet search for 'system.fileattributes' yielded the
following reference for the numeric value of the various
attributes:

http://msdn2.microsoft.com/en-us/lib...40(VS.85).aspx

So for occasional searching, I would use the command prompt or add
the attributes column & filter on that column.


Excellent ideas. I have the attributes column on anyway, but a saved
search makes it simpler, especially since I would also want to limit by
file type.

If you need to
regularly manipulate files based on attributes, you might want to
check out PowerShell:

http://www.microsoft.com/windowsserv...es/management/
powershell/default.mspx


It's not something I do very often, so another program would be
overkill. Thanks for all the good info.

--
Ray
(remove the Xs to reply)
  #5 (permalink)  
Old February 27th 08, 09:20 PM posted to microsoft.public.windows.vista.file_management
Ray[_6_]
external usenet poster
 
Posts: 66
Default Searching for files by attributes

Brink wrote:

Here are some other great Search tips if your interested.

'Windows Vista Team Blog : Advanced search techniques'
(http://windowsvistablog.com/blogs/wi.../advanced-sear
ch-techniques.aspx)


Thanks, that should come in handy.

--
Ray
(remove the Xs to reply)
  #6 (permalink)  
Old February 28th 08, 04:37 PM posted to microsoft.public.windows.vista.file_management
Keith Miller \(MVP\)
external usenet poster
 
Posts: 310
Default Searching for files by attributes

"Ray" wrote in message
...
" Keith Miller \(MVP\)" wrote:


So, if I want to search for files & folders with the read-only
attribute set, I need to type:

system.fileattributes17 OR 1)

NOT VERY INTUITIVE, EHHH?!?!?!?


Not terribly, but it's a little simpler for my case; the value is just
32.


As long as you're only searching for FILES with ONLY the archive attribute
set. That will not find folders with the archive attribute or files with
any of the attributes set: RA, HA, SA, etc. You would need the OR
contruction of all possible values with the archive attribute set.



It's not something I do very often, so another program would be
overkill. Thanks for all the good info.


You're welcome.


--
Good Luck,

Keith
Microsoft MVP [Windows Shell/User]



  #7 (permalink)  
Old February 28th 08, 10:20 PM posted to microsoft.public.windows.vista.file_management
Ray[_6_]
external usenet poster
 
Posts: 66
Default Searching for files by attributes

" Keith Miller \(MVP\)" wrote:

system.fileattributes17 OR 1)

NOT VERY INTUITIVE, EHHH?!?!?!?


Not terribly, but it's a little simpler for my case; the value is
just 32.


As long as you're only searching for FILES with ONLY the archive
attribute set. That will not find folders with the archive
attribute or files with any of the attributes set: RA, HA, SA,
etc. You would need the OR contruction of all possible values
with the archive attribute set.


Good point. Fortunately the files in question shouldn't ever have any
other attributes set, and folders aren't of interest.

--
Ray
(remove the Xs to reply)
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:55 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Optimization by vBSEO 3.0.0 RC6
Copyright ©2004-2024 Vista Banter.
The comments are property of their posters.