Topic "MV Command appends from location at the end of the to location"

Author Message


Ok. Tried this multiple ways. Have a file on remote server and I'm trying to move it to another location.
I've tried a drive mapping and UNC path method for the from location.

Mapped windows drive to Z:\testfile.txt
And tried its UNC path

When I do this or use the unc path instead...
MV Z:\testfile.txt /secondlocation/folder1/folder2/testfile.txt
MV Z:\testfile.txt /secondlocation/folder1/folder2/*.txt
MV Z:\*.txt /secondlocation/folder1/folder2/*.txt

I get this in the error:
Error moving file 'Z:\testfile.txt' to '/secondlocation/folder1/folder2/Z:\testfile.txt
No such file or directory.
Error code: 2

Why is it adding the from location to the end of the second location? I get the UNC prob cant be used but if I do this PUT Z:\testfile.txt /secondlocation/folder1/folder2/testfile.txt it works just fine.

THX for any help
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27086
Location: Prague, Czechia
The mv command is for moving remote file to another remote location.

To move a local file to remote directory, use put -delete.

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