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. |
|
Windows Vista File Management Issues or questions in relation to Vista's file management. (microsoft.public.windows.vista.file_management) |
|
LinkBack | Thread Tools | Display Modes |
|
|||
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) |
|
|||
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.* |
|
|||
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) |
|
|||
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) |
|
|||
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) |
|
|||
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] |
|
|||
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 | |
|
|