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)
Determine if the file is deleted in workflow
helloworld
Is there a way to determine the files attached with workflow is the deleted file?
Thanks !
Find more posts tagged with
Comments
kaalraa
Just get your files attached to a task through a loop and on each file you have to use iwfilestate in order to check whether the file is locked or modified. Also for deletion use (-e ). If true file exists.
I hope rest you can resolve your issue... still provide info as what environment you are using. Also brief about whether you are concerned for completely deleted file or the file deleted but not submitted.
helloworld
Kaalraa,
The environment is TS 6.5 sp2, win2k advanced server
I want to check the file that has deleted in workarea and has not been submitted to staging area.
I try to use the iwfilestate but cannot use -e option, so this is not supported in 6.5 ?
Adam Stoller
I believe the '-e' being referred to is basic Perl file test flags:
if (-e $file) { ... }
The path used for '-e' needs to be a file system path - so you should use the value of TeamSite::Config::iwgetmount() at the beginning of the path, whereas you'd want to strip of the that value from the beginning of the path before using it with something like iwfilestate
helloworld
I have use -e but not work, the code like this:
if (-e "c:\tmp\test.txt") {
$boo="t";
}else{
$boo="f";
}
but it always return "f" in workflow however the file is deleted or exist in file system.
And then,
I have tried this:
use iwattrib /default/main/... objid to get the object id first,
and then use iwattrib -o objectIdIGet /default flags to get the code, if the code is 0x00000002 or 0x00080002, that indicated it is deleted
Is this possible to work? Because I found that the code is not unique, the 0x00000002 for unlock file, the 0x00080002 for locked file, may be has another code for deleted file?
Thanks !
stefanmaier
if (-e "c:\tmp\test.txt") {
...
Hi,
try
"c:[highlight]/[/highlight]tmp[highlight]/[/highlight]test.txt", not "c:\tmp\test.txt"
Regards
Stefan
helloworld
oh, sorry, indeed I was typing "c:\tmp\test.txt" in my workflow file.
Thanks !