in reply to unlink a server file
this is telling me permission problem. And when I dir that folder using the full path and try to del it gives me thisZ:\HF ACCESS\IT\dev>perl testdel.pl \\fileprint-01\Company\HFACCE~1\IT\dev\test\test.txt couldn't delete \\fileprint-01\Company\HFACCE~1\IT\dev\test\test.txt: +Permission denied at testdel.pl line 12.
This is where it gets tricky when I change the path to the long name and put quotes around the path it allows me to delete the fileZ:\HF ACCESS\IT\dev>dir \\fileprint-01\Company\HFACCE~1\IT\dev\test\t +est.txt Volume in drive \\fileprint-01\Company is Data Volume Serial Number is C8C5-EF0A Directory of \\fileprint-01\Company\HFACCE~1\IT\dev\test 05/22/2009 10:21 AM 0 test.txt 1 File(s) 0 bytes 0 Dir(s) 196,346,269,696 bytes free Z:\HF ACCESS\IT\dev>del \\fileprint-01\Company\HFACCE~1\IT\dev\test\t +est.txt \\fileprint-01\Company\HFACCE~1\IT\dev\test\test.txt Access is denied.
I verified this with another file test.tst.txt afterZ:\HF ACCESS\IT\dev>del "\\fileprint-01\data\company\hf access\it\dev\ +test\test.txt"
Now when I tried putting this into play with perl and unlink this is what I recieved.Z:\HF ACCESS\IT\dev>dir \\fileprint-01\Company\HFACCE~1\IT\dev\test\t +est.tst.txt Volume in drive \\fileprint-01\Company is Data Volume Serial Number is C8C5-EF0A Directory of \\fileprint-01\Company\HFACCE~1\IT\dev\test 05/22/2009 11:27 AM 0 test.tst.txt 1 File(s) 0 bytes 0 Dir(s) 194,855,174,144 bytes free Z:\HF ACCESS\IT\dev>del \\fileprint-01\Company\HFACCE~1\IT\dev\test\ +test.tst.txt \\fileprint-01\Company\HFACCE~1\IT\dev\test\test.tst.txt Access is denied.
In the script I inserted quotes around the file name for the first run and removed them for the second because that is what did it for del in the command prompt. What am i missing about unlink, why when I use quotes it tells me that it does not exist and when I don't it tells me permission denied.Z:\HF ACCESS\IT\dev>perl testdel.pl "\\fileprint-01\Company\HF ACCESS\IT\dev\test\test.tst.txt" couldn't delete "\\fileprint-01\Company\HF ACCESS\IT\dev\test\test.tst +.txt": No such file or directory at testdel.pl line 12. Z:\HF ACCESS\IT\dev>dir "\\fileprint-01\Company\HF ACCESS\IT\dev\test\ +test.tst.txt" Volume in drive \\fileprint-01\Company is Data Volume Serial Number is C8C5-EF0A Directory of \\fileprint-01\Company\HF ACCESS\IT\dev\test 05/22/2009 11:27 AM 0 test.tst.txt 1 File(s) 0 bytes 0 Dir(s) 194,891,591,680 bytes free Z:\HF ACCESS\IT\dev>perl testdel.pl \\fileprint-01\Company\HF ACCESS\IT\dev\test\test.tst.txt couldn't delete \\fileprint-01\Company\HF ACCESS\IT\dev\test\test.tst. +txt: Permission denied at testdel.pl line 12.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: unlink a server file
by ig (Vicar) on May 23, 2009 at 05:31 UTC | |
by jonschin (Novice) on May 26, 2009 at 13:56 UTC | |
|
Re^2: unlink a server file
by ikegami (Patriarch) on May 25, 2009 at 17:47 UTC |