Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

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

Driver Scanner

Searching for files by attributes

microsoft.public.windows.vista.file management






Speedup My PC
Reply
  #1 (permalink)  
Old 02-27-2008
Ray
 

Posts: n/a
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)
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-27-2008
Brink
 

Posts: n/a
Re: 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.*
Reply With Quote
  #3 (permalink)  
Old 02-27-2008
Keith Miller \(MVP\)
 

Posts: n/a
Re: 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" <vortren-newsx@yaxhoo.com> wrote in message
news:Xns9A50DF46BA12Aamfmssb@207.46.248.16...
> 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)


Reply With Quote
  #4 (permalink)  
Old 02-27-2008
Ray
 

Posts: n/a
Re: Searching for files by attributes
" Keith Miller \(MVP\)" <k.miller@NOSPAM.mchsi.com> 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)
Reply With Quote
  #5 (permalink)  
Old 02-27-2008
Ray
 

Posts: n/a
Re: Searching for files by attributes
Brink <Brink.35fcc2@no-mx.forums.net> 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)
Reply With Quote
  #6 (permalink)  
Old 02-28-2008
Keith Miller \(MVP\)
 

Posts: n/a
Re: Searching for files by attributes
"Ray" <vortren-newsx@yaxhoo.com> wrote in message
news:Xns9A51AF7CFFC39amfmssb@207.46.248.16...
>" Keith Miller \(MVP\)" <k.miller@NOSPAM.mchsi.com> 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]



Reply With Quote
  #7 (permalink)  
Old 02-29-2008
Ray
 

Posts: n/a
Re: Searching for files by attributes
" Keith Miller \(MVP\)" <k.miller@NOSPAM.mchsi.com> 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)
Reply With Quote
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 Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Files attributes Read Only in Program files Munteanu Gabriel microsoft.public.windows.vista.file management 4 04-24-2008 18:36
Searching files wilmon44 microsoft.public.windows.vista.file management 10 03-25-2008 18:07
Searching for files Roger Van Loon microsoft.public.windows.vista.general 8 02-01-2008 23:01
searching files Pete L microsoft.public.windows.vista.general 3 08-23-2007 22:14
Searching within files... NPS microsoft.public.windows.vista.general 3 03-01-2007 12:06




All times are GMT +1. The time now is 02:39.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com , Win7Heads.com and Win8Heads.com.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 RC 2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120