Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Retrieve File Attributes
mfritsky
I have a custom CGI where I need to retrieve a set of file attributes for multiple files. Currently, I'm just making a bunch of calls to iwattrib for each file. However, the performance really suffers when I need to do this for numerous files. Is there any way to get a set of attributes back with a single call? In particular, I'm interested in the lock status, modification date and last modified user for each file. Any tricks you might have used would be appreciated.
Find more posts tagged with
Comments
nipper
I know there are FR to include a -f flag and provide a file list. Does not look like that has happened.
However I would suggest creating a shell script and running that at once, if you loop through (in perl)
and do a bunch of system calls, that is a performance hit, execing a shell script would be better (far from great).
Makes the return values harder.
Andy
Adam Stoller
For lock status you can use iwfilestate - which allows for multiple vpaths on the command line.
For last modified date / last modified by information - you could do a long-listing of the files and parse the output - which may or may not be the same as looking at the data returned by iwattrib (at least on Unix, not sure what the proper equivalent would be on Windows other than possibly running stat() on each file -- this would still be within a single script invokation so you'd avoid the process overhead of running multiple CLTs but you'd pay the cost in running stat on each file).
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com