pscp -r problem creating remote folders?

Posted on 2005-05-03
Medium Priority
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

Mysidia earned 2000 total points
ID: 13919412
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

Expert Comment

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

another gui based tool is available at
LVL 15

Author Comment

ID: 13919822
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Virtualization software lets you run different versions of Windows, Ubuntu Linux and other versions of Linux all at the same time, rather than running each one directly from your computer's hard drive.
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.
Suggested Courses

601 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