Topic "Drag and Drop folder move on remote server fails"

Author Message


Im using WinSCP on Windows 7 to move files around on a ubuntu 11.04 server on my network. Im using SCP protocol.

When i try to drag a folder from /mnt/hda/Some Folder to /mnt/hda/Another Folder i get error message:

Command 'mv -f "Some Folder" "/mnt/hda/Another Folder/Some Folder"'
failed with return code 1 and error message
mv: omitting directory `Some Folder'.

When i try this command in Putty i also get and error, but if i add the -r flag the move is done successfully:
mv -rf "Some Folder" "/mnt/hda/Another Folder/Some Folder"

Is there an way to have WinSCP add the -r flag to the mv command when i use drag and drop?

[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26572
Location: Prague, Czechia
It does not seem that -r switch to mv command is universally accepted, so I cannot add it to the command.


if you are trying to replace the Some Folder
try with
mv "Some Folder" "/mnt/hda/Another Folder/"

also, if your req allows, try use _ instead of space.


forgot to mention,
-r means recursively dig everything in your "some folder" in to the
"/mnt/hda/Another Folder/Some Folder"'

if is a file you do not need the -r, because you are moving a folder and it is not empty, SCP is like sftp it does not allow.

but if you are the unix prompt (you are the owner) you can move a folder and everything in it will be moved, no need to specify -r

-r is famous, chmod -R, ls -lR, rm -f -r..... everywhere use the R for recursive digging in to sub sub-sub sub-sub-sub directories..

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License