Drag and Drop folder move on remote server fails

Advertisement

Guest

Drag and Drop folder move on remote server fails

Hi

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?

Thanks

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: Drag and Drop folder move on remote server fails

It does not seem that -r switch to mv command is universally accepted, so I cannot add it to the command.

Reply with quote

simypkl
Guest

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.

Reply with quote

simypkl
Guest

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..

Reply with quote

Advertisement

You can post new topics in this forum