pscp -r problem creating remote folders?

Posted on 2005-05-03
Last Modified: 2012-05-05
Hi everyone,

I am having the following problem using pscp.exe

I want to do:
pscp -r . username@server:/path/data

On a unix machine (using the scp version of this command), this results in:
COPY: all sudirectories of the current working directory on the local machine
TO: /path/data on the remote machine

On my winXP machine, this command fails with the following error message:
scp: <working directory>: No such file or directory
(where <working directory> is the name of the current working directory)

NOTE: pscp.exe works without any problem to copy single files from my local machine to the remote machine.

So this is a two part question:
(a) where is the problem? (am I using an incorrect syntax? is pscp.exe incapable of creating directories on the remote machine? is there something wrong with the remote machine?)
(b) what can I do to fix it? (is there an alternative to pscp.exe for windows?, should I use a different syntax? etc)

Thanks very much!
Question by:nicholassolutions
    LVL 23

    Accepted Solution

    Are you sure  /path/data  exists on the server?

    The "scp:" prefix is a big hint that the problem is on the server side,
    finding the target directory but there may be what I would think of
    as a bug in pscp...


    pscp -v -r C:\full\path\to\current\directory  username@server:/path/data
    LVL 3

    Expert Comment

    problem is in your windows
    pscp -r * username@server:/path/data

    another gui based tool is available at
    LVL 15

    Author Comment

    Thanks for your post, Mysidia.

    I actually had a couple different problems:
    (1) I needed to use the full windows path, as you pointed out.
    (2) I needed to use "back slashes" i.e. "\" following the server name

    To summarize, here is the command that works:
    pscp r C:\full\path\to\current\directory  username@server:\path\data


    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
    Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now