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)
Delete a file from staging
lucifer
hi,
Is there any CLT or perl code to delete a file from staging and workare?
Find more posts tagged with
Comments
chandub
Hi,
You can try this
1) delete your file in workarea
2 ) when you submit the directory,( turn on the overwrite option on your top right hand side)
3) this will enable you to overwrite your staging area and same file will be deleted from staging too.
Hope this will solve your problem
Chandra
Adam Stoller
You have to delete the file in the workarea and then "submit the deletion" to staging.
I believe you can do this in perl code by:
1) doing an unlink() of the file in the workarea
2) using iwsubmit to send the deletion to staging.
Something like (untested)
unlink("$iwmount/default/main/WORKAREA/wa/foo.txt");
`iwsubmit -r -w /default/main/WORKAREA/wa/foo.txt "deleted"`;
--fish
(Interwoven Senior Technical Consultant)
wailing
Hi,
On a separate but related sidenote, does anybody know why:
- when iwsubmit is done on a per-file/directory basis, the file name must begin with the archive name
- when iwsubmit is done on a per-workarea basis, the absolute file name may be used?
Let me give an example:
For a file called "foo.txt", this works after 'rm foo.txt':
iwsubmit -r -w /default/main/WORKAREA/wa/foo.txt "deleted"
But this does not:
iwsubmit -r -w /iwmnt/default/main/WORKAREA/wa/foo.txt "deleted"
ERROR:02005: Error locating /iwmnt/default/main/WORKAREA/wa/foo.txt
But if I do this, it works:
iwsubmit -r -w /iwmnt/default/main/WORKAREA/wa "deleted"
so, do I take it that I should always iwsubmit (and iwupdate) with the archive name, if I want to do it on a per-file/directory basis?
rgds,
Rika
james1
Submitting deleted files is tricky, because the file cannot be found on the file system.
The safest thing to do is to always provide absolute (not relative) archive-rooted (or, in 5.5.2 parlance, store-rooted) vpaths, whenever a CLT wants a vpath (as opposed to a file system path).
-- James
--
James H Koh
Interwoven Engineering
Adam Stoller
Please look at the usage:
presentation >iwsubmit -h
Usage: iwsubmit [-h] [-v] [-s] [-w|-x] [-u] [-r] [-c global_comment] [-i info_comment] {
vpath
file_comment}+
Sigh - I just had a whole explanation typed up here, but I seemed to have lost it.
Look through the forum posts and you'll find some other discussions about vpaths versus file paths - and why despite the fact that most of the CLTs say they want vpaths, some of them will accept file paths in some circumstances (which is what you are running into here).
--fish
(Interwoven Senior Technical Consultant)
wailing
thks James and Ghoti. Since my last posting, I've been trying various scenarios:
for a file or directory deletion, whichever option used ie. -s or -w or -x
you gotta use the vpath beginning with the archive name.
The CLT usage message is terse and vague. As usual.
So is the manual.
Usage: iwsubmit [-h] [-v] [-s] [-w|-x] [-u] [-r] [-c global_comment] [-i info_comment] {vpath file_comment}+
Usage: iwsubmit [-h] [-v] [-s] [-w|-x] [-u] [-r] [-c global_comment] [-i info_comment] -f file_name
-h displays this usage information.
-v displays this command's version number.
-s skip conflicts and locked files
-w overwrite all files. Files in STAGING but not in
src_area will be deleted
-x overwrite conflicts
-u unlock locked files
-r report on submitted files
-c global_comment comment to attach to submit event
-i info_comment second comment to attach to submit event
-f file_name file from which to read the vpath and file_comment
(use newline to separate vpath and file_comment)
(if file_name is -, stdin will be read)
vpath path to a file, directory, or workarea.
file_comment comment to attach to the file