Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the '10.5: Remove the 'downloaded file' warning flag' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Remove the 'downloaded file' warning flag
Authored by: billspat on Sep 18, '08 10:58:55PM

Ok, one more way to accomplish this same thing... in terminal only

(by the way, I compiled the c code above and it works like charm (10.5.5). but you need Xcode etc. It's very fast)

The apple script in this hint uses the xattr program which comes with Leopard. But it doesn't support folder recursion (and doesn't have a man page). To apply xattr to all files in a a folder tree, use xargs

find folderpath -print | xargs xattr -d

(replace folder path with your folder, e.g. ~/downloads)

Since xattr doesn't have a man page, here's the output from xattr -h Thanks very much to the original poster for figuring out this command in the first place.

usage: xattr [-l] file [file ...]
       xattr -p [-l] attr_name file [file ...]
       xattr -w attr_name attr_value file [file ...]
       xattr -d attr_name file [file ...]

The first form lists the names of all xattrs on the given file(s).
The second form (-p) prints the value of the xattr attr_name.
The third form (-w) sets the value of the xattr attr_name to attr_value.
The fourth form (-d) deletes the xattr attr_name.

  -h: print this help
  -l: print long format (attr_name: attr_value)

[ Reply to This | # ]
10.5: Remove the 'downloaded file' warning flag
Authored by: joelparker on Nov 20, '08 01:22:13PM
If you want to change this on the command line as suggested above, you need to escape the spaces in filenames using the "-print0" in find and the "-0" in xargs, e.g.,
find folderpath -print0 | xargs -0 xattr -d
in fact, I plan to use this frequently (I find it particularly annoying the ACL is inherited into all the files in an archive you have downloaded), so I have an alias in my .cshrc (which I prefer to a Folder Action because I have control over when to use it):
alias noquar 'find !$ -print0 | xargs -0 sudo xattr -d'

[ Reply to This | # ]