WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
Page Index Toggle Pages: 1
Custom extension for FTP-upload file (Read 667 times)
YaBB Newbies

Posts: 7
Custom extension for FTP-upload file
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?
Back to top
IP Logged
YaBB Administrator

Posts: 2270
The Netherlands
Re: Custom extension for FTP-upload file
Reply #1 - 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.

Back to top

Gert Rijs - gert (at) gdpsoftware (dot) com
End Alzheimer's:
WWW WWW GdPSoftware  
IP Logged
Page Index Toggle Pages: 1