Topic "File upload creates directory"

Author Message
frankblack
[View user's profile]

Joined: 2015-06-17
Posts: 2
WinSCP 5.7.3.5438, Windows 8.1 Pro, Scripting with Eclipse, protocol scp

I am using WinSCP for synchronizing files, but whenever a PDF file has to be synchronized, a directory with that name is created on remote. As I recognize it at the moment, PDF is the only file format causing this error. Maybe there are other file formats.

[exec] Starting WinSCP...
[exec] winscp> option batch abort
[exec] batch abort
[exec] reconnecttime 120
[exec] winscp> option confirm off
[exec] confirm off
[exec] winscp> open scp://dummy@dummy.dummy.de:***@dummy.dummy.de
[exec] winscp> option transfer binary
[exec] transfer binary
[exec] winscp> mkdir "/root/www/path/to/folder/pdf/thepdffile.pdf"
[exec] winscp> exit
[exec] WinSCP finished without errors.

[exec] Starting WinSCP...
[exec] winscp> option batch abort
[exec] batch abort
[exec] reconnecttime 120
[exec] winscp> option confirm off
[exec] confirm off
[exec] winscp> open scp://dummy@dummy.dummy.de:***@dummy.dummy.de
[exec] winscp> option transfer binary
[exec] transfer binary
[exec] winscp> synchronize both -criteria=either "C:\local\path" "/root/www/path/to/folder/pdf"
[exec] Using configured transfer settings different from factory defaults.
[exec] Comparing...

Any idea what I am doing wrong? Thanks in advance for any assistance.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
You are explicitly creating a directory named thepdffile.pdf:

mkdir "/root/www/path/to/folder/pdf/thepdffile.pdf"
frankblack
[View user's profile]

Joined: 2015-06-17
Posts: 2
Thanks for your answer prikryl. Indeed the script I use was to blame (http://rays-blog.de/2012/05/05/94/use-winscp-to-upload-files-using-eclipses-autobuild-feature/). Strangely the script "thinks" a PDF is a directory. So I inserted an "if" for preventing this behaviour.
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