Topic "Uploading files creates a new directory on remote server"

Author Message
andrewkc69
[View user's profile]

Joined: 2015-03-27
Posts: 6
Location: Portland
Hello,
I am using the latest version of WinSCP, and I am using the .NET assemblies. The transfer protocol is SFTP. When I run the session.PutFiles, it doesn't matter what I specify as the remote folder, and here is what happens:

Let's say the local folder is called "D:\FTPFiles\" and I am using the TransferOptions.FileMask, which is set to "ODS*.txt". The remote folder is set up as "\from_idx\". I'm using the filemask because I only know what the prefix of the file name is. The file transfers fine, but the problem is that when I look on the ftp server I see the file in "\from_idx\FTPFiles\". It creates the directory under the remote directory.

I've tried a number of options, including making the remote directory "/". When I do that, it just creates the new directory in the root. The only way I have gotten this to work without creating a new directory is to name the local folder the same as the remote folder. In reality, I can't do this. From what I have read on your site, this should not be happening.

Am I doing something wrong, or is this a bug?

Thanks,
Andy
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Use "D:\FTPFiles\*" for localPath.
andrewkc69
[View user's profile]

Joined: 2015-03-27
Posts: 6
Location: Portland
prikryl wrote:
Use "D:\FTPFiles\*" for localPath.


Thank you so much! That worked!!
Advertisements

You can post new topics in this forum






Search Site

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License