Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

File transfer not working on server

by Anonymous Monk
on Aug 21, 2006 at 18:25 UTC ( #568634=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I can copy/transfer a file from my Windows 2000 workstation to an Info Server using Perl script with File-Copy module. But when I try and copy/transfer the same file from my Windows 2000 Server (using the same Perl script with File-Copy module) to the same Info server it says it can not find the Info server and does not work.

I assume this could be a Firewall problem on the server and not a script issue? Or is there something in Perl I can do to find out what the issue is?

The destination directory in the Info server has a space in it but I read File-Copy can handle that so I know that is not the issue. Here is my copy and directory exist check condition:
copy($sourceFile,$destinationFile) || die "$!"; ..... if(!-d $destinationFile) { print "Destination Directory not found."; }

Replies are listed 'Best First'.
Re: File transfer not working on server
by Jenda (Abbot) on Aug 21, 2006 at 23:03 UTC

    Is the script running under the same user account in both cases? What does actually the "Info Server" mean? Are you able to access the remote directory manually while logged in on the W2k server? Is the $destinationFile a UNC (\\server\share\directory) or is it using a (supposedly) mapped disk letter? And is it really mapped?

Re: File transfer not working on server
by izut (Chaplain) on Aug 21, 2006 at 18:29 UTC

    -d is used for directories. You should use -f instead. Check -X.

    Igor 'izut' Sutton
    your code, your rules.

Re: File transfer not working on server
by izut (Chaplain) on Aug 21, 2006 at 18:58 UTC

    $destinationFile points to a file or a directory? Is Perl throwing some error or warning message when executing copy() instruction?

    Igor 'izut' Sutton
    your code, your rules.

      distinationFile points to directory.

      I left out in my example but I am checking for file existence earlier in the script using the -e condition.

        Are you using use strict; and use warnings;? Again, is Perl throwing some error or warning? Is it dieing? If you provide more information, you will get better answers.

        Igor 'izut' Sutton
        your code, your rules.

Re: File transfer not working on server
by mantra2006 (Hermit) on Aug 22, 2006 at 16:40 UTC
    Hey

    Is InfoServer is unix or windows? and also before running the script check
    to see you can access InfoServer from explorer..and also check to see the "//" or "\\"
    for directory definition


    Sridhar

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://568634]
Approved by Joost
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2021-04-15 06:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?