Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: scp file from windows10 to unix server

by syphilis (Archbishop)
on Feb 18, 2020 at 13:11 UTC ( [id://11113104]=note: print w/replies, xml ) Need Help??


in reply to Re^2: scp file from windows10 to unix server
in thread scp file from windows10 to unix server

I got not recognized as an internal or external command error when I use just scp.exe instead of absolute path,

If you want to run the command as simply scp.exe or scp then you'll need to add C:/Windows/System32/OpenSSH to the PATH:
set PATH=%PATH%;C:\Windows\System32\OpenSSH
But I am able to run it in cmd line without issues

Yes, I understand that.
I'm just saying that when I've struck this type of issue in the past, the first approach that haukex suggested of replacing system($cmd) with system(@cmd) has often worked for me.
That's the first thing I'd be trying.
Oh ... and use warnings; if they're not already enabled.

Cheers,
Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11113104]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-26 04:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found