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)
Unlink from cgitask does not delete file
lcarr
TS 5.5.2 Win2K
I call Perl's unlink from a cgitask to delete a DCR created by the same cgitask. The DCR exists on the Y: drive. But I consistently get an error "No such file or directory"
I've checked the path and tried forward slashes -vs- backslashes, but neither works.
I am calling with the format
$del_cnt = unlink('$IWHOME$area$file') or debug("Cannot delete file because $!");
Find more posts tagged with
Comments
Migrateduser
Don't you want IWMOUNT instead of IWHOME?
lcarr
Yes, my brain cramp...I do have $IWMOUNT
export.png
Migrateduser
Also do you have double quotes? Because variables inside single quotes are not interpeted (so you would be trying to delete a file named $IWHOME$area$file, which probably does not exist).
unlink( "$IWMOUNT$area$file" ) or debug("Cannot delete file because $!");
lcarr
That was it. I put in double quotes and the file was deleted. Thanks!