Topic ""Move to" created a File for Directory that did NOT exist."

Author Message


So I know I made a mistake.

I just updated to WinSCP 5.9.6

I went to Transfer files off of our our FTP Server on to my local computer, and used "Move to" like I would have in older versions of WinSCP. The directory I was looking for was not in the drop down and I did not see a browse button like I thought use to be there, so I made the bad decision of just copying and pasting the directory path into the "Move To" dialogue box.

WinSCP transferred all the files, but not were I thought they were going. Instead, inside the directory on the FTP server where the files were located, there is now a file with no extension named the same as the path which I copied and pasted in to the "Move To" dialogue box.

Is anybody aware of a fix. Is there a way to get inside the file WinSCP created and extract the files I was transferring. Or are the files just gone.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27083
Location: Prague, Czechia
No. Unfortunately, you have lost the files. The file you have contains only the last moved file. The previous files were overwritten.

Actually, you should have received this warning:

Are you sure you want to transfer multiple files to a single file '...' in a directory '...'?

The files will overwrite one another.

If you actually want to transfer all files to a directory '...', keeping their name, make sure you terminate the path with a slash.

The primary mistake you have made was that the "Move to" command is for moving files to another folder/name on the server. This command does not have "Browse" button (and never had).

For moving files to local folder, use "Download and Delete" command (which was called "Move" in older versions of WinSCP). This command has "Browse" button.

martin wrote:
Actually, you should have received this warning...

...I'm wondering: why even have this warning & allow people to move a set of files into 1 file, each file overwriting the previous 1? useful is that?

I think that it should always move a set of files into a directory (whether the destination has a trailing slash or not) shouldn't be possible to shoot yourself in the foot this badly, simply because of a theoretically "missing" trailing slash (it's not missing: that is the destination, which should be assumed to be a directory, since we're moving multiple files).

I also got this warning a few days ago, it scared the crap outta me (not wanting to lose my files!), so I clicked Cancel (I didn't lose or move any files), then I used the remote command line, with a command I knew wouldn't have any horrible side effects, to perform the move.

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