Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Copying files
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
smool




PostPosted: Wed Nov 07, 2012 2:03 pm   Post subject: Copying files

I wrote a program to copy some files for me automatically, except that whenever I use the the File.Copy proc, then put Error.LastMsg, it always says Access (permission) denied, and it doesn't copy anything. I tried copying to different directories on my computer, not using my C: drive, but always the same thing. How can i by-pass this?
Sponsor
Sponsor
Sponsor
sponsor
mirhagk




PostPosted: Wed Nov 07, 2012 10:56 pm   Post subject: RE:Copying files

You could try use Sys.Exec and passing in command line commands for copying files, and seeing if that works
Tony




PostPosted: Wed Nov 07, 2012 11:10 pm   Post subject: RE:Copying files

do you actually have access to those files though? E.g. can your program read content from them?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
mirhagk




PostPosted: Wed Nov 07, 2012 11:37 pm   Post subject: RE:Copying files

That's true, you only mentioned to tried different destinations, but you need to try different source files too. Even if you have permission (ie are admin) the file might be in use, or locked from something else etc. Make sure you can physically copy it yourself.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: