Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
List of deleted files
arabif
My external Task gets the list of files submitted (using task->GetFiles ()) and processes it. The issue is - if a directory is deleted and submitted, GetFiles () returns only the directory name and not the files within the deleted directory. When I look into the submit log, it shows the directory and as well as the files within the deleted directory.
Currently, I look for the directory in the staging area and get the list of files recursively. Is there a better way to do this?
* On submitting files, Workflow is invoked. This workflow processes the files and then submits them.
TeamSite 6.5 on Solaris
Thanks
Find more posts tagged with
Comments
Adam Stoller
Processing the directory in staging is, as far as I know, the only way to do this.
Feel free to contact support and file a feature request for an officially supported function to do this, or to have the system provide that information in the files attached to the job in the first place.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
awizardly
I generally dislike allowing users to attach directories to workflows for just this kind of reason.
Because I can't stop them from doing it, I generally expanded directories using something like find and replace the directory with the underlying files that are contained within a directory. I do this in an external task and then give the users the opportunity to verify files. This makes it very evident to me what is really going to happen and also for me to check for inadvertent locks that the user may not be aware of and warn them. This is particularly problematic on a submit because a file buried deep within the directory structure could be locked and therefore causing a conflict which prevents the rest of the directory from submitting correctly.
This may not work with a deleted directory though given that from a filesystem perspective the files don't exist in the WA anymore. More information about what is in a directory would be nice. Directories are such different entities in TS and their behaviour at times can be really puzzling. More clarity is always better.
Lee
Organic Inc
http://www.organic.com
Adam Stoller
For a directory that still exists in the workarea you can use iwlistmod to get a list of all the modified files in that directory.
You can also use iwlistlocks to get a list of all the files locked within the entire workarea and parse it for those files that live within the selected directory.
For a directory that no longer exists in the workarea you can still use iwlistlocks on the branch (not STAGING) and parse the output to look for locks on files within the directory.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com