Problem in copying a file from Local HD to server!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thanawala27
    New Member
    • Mar 2007
    • 68

    Problem in copying a file from Local HD to server!

    Hi,

    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.


    [code]

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

    [\code]

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

    Thanks,



    Ravi
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    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.

    Regards,

    Jeff

    Comment

    Working...