Reply to topic
Perl File::Copy problem
thalapathi


Joined: 17 Sep 2005
Posts: 2
Location: India,Chennai
Reply with quote
use File::Copy;
copy("E:/Main/Take/5/Image.JPG","E:/BmpTxtZip/picture.JPG") or die "copy failed: $!";
copy("E:/Main/Take/5/Cabinet.cab","E:/BmpTxtZip/small.cab") or die "copy failed: $!"; #always file to copy cab files

after running i get
copy failed: at E:\AUTOMATION\CopyFiles.pl line 3.

using this syntax i can able to copy bmp,JPG,txt files but unable to copy cab files.i don't know why?
raina


Joined: 02 Nov 2005
Posts: 2
Reply with quote
What version of Perl are you using?
I am able to run this successfully with version 5.8.2 and the files did get copied. Not sure this is a version problem though. Just guessing.
Perl File::Copy problem
thalapathi


Joined: 17 Sep 2005
Posts: 2
Location: India,Chennai
Reply with quote
Hi raina,

Thanks for your reply.Perl version i am using is 5.8.6.Actually problem releated to me was that file E:/BmpTxtZip/small.cab was always ReadOnly.Even i manully changed it's attributes to read and write,it wont get change.so that only i am getting this error.After i found this problem not releated to perl.Sorry Raina.I also read your post[Usage of Perl's XML::Paser Module] if possible i will send a good reference.

Thanks
Perl File::Copy problem
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic