WatchDirectory Forum
watchDirectory forums >> Plugins >> Custom extension for FTP-upload file

Message started by handsome on Feb 13th, 2017 at 9:55pm

Title: Custom extension for FTP-upload file
Post by handsome on Feb 13th, 2017 at 9:55pm
Thank you very much for a great product which we use extensively!

In one of our usage scenarios we are about to start using this feature of the FTP-upload plugin:

- Upload files with a .partial extension
If you select this option, files will be uploaded with an extra extension. So, the file hello.txt will be uploaded as hello.txt.partial. When the upload is complete, the file is renamed back to hello.txt.

The only problem is that the SFTP-site we are uploading the files to expects that the extension should be ".temp" during the upload and then changed to the original extension when the upload has completed. So we would need a way to have Watchdirectory use "hello.temp" as filename during the upload instead of "hello.txt.partial" and then on completion the filename should be changed to "hello.txt". Is this something you could consider in the near future?

Title: Re: Custom extension for FTP-upload file
Post by Gert on Feb 14th, 2017 at 2:22pm
With the current release you can use the following (undocumented) feature.

If your task is called HELLO, make sure you set the option to use .partial. Do not start the task yet.
Select the menu "Tools -> Explore Task Directory" (Windows Explorer opens inside the directory with your settings/tasks).
Open the file HELLO.config using notepad
Search for "usetempname=1"
add the following new line:

Not exactly what you want, the file hello.txt will now be uploaded as hello.txt.temp and renamed back to hello.txt after the upload is complete.

WatchDirectory Forum » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2018. All Rights Reserved.