By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,903 Members | 1,104 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,903 IT Pros & Developers. It's quick & easy.

Problem in copying a file from Local HD to server!

P: 68

My perl scripts run on a unix server which i access from a windows machine.

I wanted to copy a file from the local HD to this server.
But the problem is, whenever i try to access a file on the local Hd, it dosent allow at all. I discovered that, as the perl scripts are run on a remote machine, it is not possible to access the files on the local HD because of security issues. (correct me, if im wrong here)
I used the following code to copy the file from the source (local HD) to the unix server.


$srcfile = "C:/report.txt";
system("cp $srcfile /home/fdgj84/Klocwork/$srcfile");


Now, this doenst work at all. Is there any way of doing this.


Jun 16 '08 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 2.5K+
P: 3,503
How are you having the Perl script connect to the remote server? Are you using FTP? You have to connect to it with a transfer protocol if you are to put a file to it.


Jun 16 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.