Script

FTP

The professional tool to automate FTP, SFTP, FTPS and Batch FTP

ScriptFTP 4.2

1st June 2017

A new release is here. The changes are mostly bug fixes and setup enhancements:

– Setup now runs ngen.exe for faster program startup. What is ngen?
– Setup now opens ScriptFTP and the Lesson 1 of the FTP scripting guide after finishing the install.
– Setup shows the End User License Agreement (EULA) before installing. Nothing changed in the EULA but it seems that in some countries this is required before installing any software.
– Fixed a bug in RENAMEFILE command when using more than one dot when changing file extensions. For example: RENAMEFILE (“*.xml”,”*.xml.collect”)
– Fixed some weird quoting bugs in the EXEC command.
– When plain FTP is used a warning message is shown when OPENHOST is called.
– Fixed $ in passwords. String expansion which was a hidden feature has been removed.
– If SETPORT is used SETPROTOCOL will not set the port automatically and will keep the port set beforehand.
– Fixed an error where SYNC was not checking if a directory to be uploaded was in the exclusion list

Tags


How to set a FTP script to be run every X minutes

30th May 2017

From time to time a question like this is received in the tech support inbox:

I wanted to ask if you can set the sheduler every minute, thank you so much

In this case, the answer is straight: using the Windows task scheduler. Let’s see step-by-step how to configure it to run a FTP script every 1 minute:
 1.- First, we create the scheduled script under ScriptFTP. This is a shortcut that will create for us a scheduled ScriptFTP task in the Windows task scheduler. We can also open directly the Windows the windows task scheduler and create the task manually but we will have to enter the ScriptFTP.exe path, the script path etc. Using ScriptFTP for this is easier:

read more …


Running ScriptFTP on windows startup, logon etc

24th April 2017

More common questions:

Is that possible to run ScriptFTP automatically as a service everytime when Windows starts? If its possible to automate startup on logon?

Yes, this is possible. Instead of running it as a service you need to create a scheduled task from ScriptFTP and then go to the Windows task scheduler and edit its settings. Some screenshots below:

 

 

Scheduling ScriptFTP this way you can set it to be run not only at a given time but also at startup, at logon, on idle, when the user connects or disconnectes and also when the screen is locked or unlocked.

 


A dump of random common questions

18th January 2017

I would like to obtain the encryption tool.

For sending you a link of the scripting tool it is needed to buy a license. You can find more information here.

How can i start a scheduled task every hour at XX:55 and at startup of scriptFTP

You need to create a scheduled task within ScriptFTP and then open the windows task scheduler (usually under the control panel). Once you have located that task in the windows scheduler, open it and go to the “Triggers” tab. There you have to schedule the task to be run daily at, for instance, 00:55 and to be repeated every hour for one day.
To run a script file at the ScriptFTP startup you need to create a shortcut in windows that calls ScriptFTP wiith these parameters:

C:\Program Files(x86)\ScriptFTP\ScriptFTP.exe "C:\the_path\to_my_script\the_script_file.ftp"


How to download a file from the web in ScriptFTP

29th December 2016
ScriptFTP has commands to retrieve files from FTP sites only but it can also download files from the web (HTTP/HTTPS) using an external tool like CURL. You can download it going to this page. The Windows version of CURL is almost at the bottom of that page.
Once you have downloaded it you need to place curl.exe in any folder and call it from ScriptFTP using the EXEC command this way:
# Set the current local directory
LOCALCHDIR("C:\Users\Carlos\Desktop\curl_downloaded_files")
 
# Call curl
EXEC("C:\path_to\curl\curl.exe -O https://www.mydomain.com/thefile.zip")
If you browse the CURL website or run “curl.exe –help” you will notice the big amount of options and switches it has. It is a very versatile tool that not only downloads file from websites, it is also capable of automating form filling, HTTP authentication etc. For example, if the web browser prompts to enter an user name and password you can tell curl to login this way:
# Download a file using HTTP authentication
EXEC("C:\path_to\curl\curl.exe --user johndoe:thepswd -O https://www.mydomain.com/thefile.zip")
Note that HTTP authentication is not the kind of authentication you commonly find when going to web sites like yahoo mail, gmail etc. These are just HTML forms. You can identify HTTP authentication when the browser asks for the login in a very spartan pop-up window on top of the web browser.

read more …

Tags


Handling file dates and time spans

13th December 2016

The ScriptFTP scripting language does not have data types (As most scripting languages) and dealing with anything which is not plain text requires some kind of tricks. This happens with file lists as we have seen before, dates and time spans suffer the same limitation. This post covers how these data types are handled in ScriptFTP.

read more …


Lists in ScriptFTP

24th November 2016

ScriptFTP, as many script languages, does not have data types. This makes the script language and its syntax a lot easier to learn but not as powerful as others. Think of it as being “not so descriptive” and “less complex”. The drawback, in practice, is that you cannot handle things like “lists”,”sets” etc. Everything is a plain text string and you need to deal with this limitation to get the things done.

Regarding to the lists. How can the FTP script handle a list? There is a shortcut:

$my_list = "my_item_number_1|my_item_number_2|my_item_number_3"
 
FOREACH $item_name IN $my_list
     PRINT($item_name)
END FOREACH

Running the script you get:

my_item_number_1
my_item_number_2
my_item_number_3

 

read more …

Tags


How to run a scheduled FTP script in the background

16th November 2016

The ScriptFTP integrated scheduler is used to set a script to be run at given times. Once a script is scheduled the Windows Task programming service will automatically launch ScriptFTP.exe with the appropiate parameters and a window will pop-up in the user desktop and do the file transfer. Some users find this annoying and want the FTP script to be run in the background. This post covers this issue.

 

read more …


ScriptFTP 4.1

7th November 2016

This new release comes with the following changes

  • Brand new user interface that works fine under high DPI displays (mostly newer laptops and high end screens). If you see the ScriptFTP window very small or with a normal size but blurry this release will solve the issues
  • New ScriptFTP scheduler that works under the newest version of the Windows Task Programming service (Windows 8/10)
  • Faster script execution and separate process for script running
  • The status bar shows buttons to quickly access to script autorun and script output settings.
  • Updated security SSH and SSL protocols with the latest revisions.
  • Other minor bug fixes.

Tags


How ScriptFTP 4.1 looks on high-dpi screens

15th August 2016

Since the version 3, ScriptFTP has relied Windows Forms to build its buttons, panels etc. This is one of the many available tools that we the software developers use to build user interfaces, a very popular in fact. But since high density displays (high DPI displays) are becoming more and more popular, users of the apps that use this technology notice that they look bad on their shiny new screens. They only have two choices: scale everything up, making these apps look pixelated or keep their original size and struggle to understand anything on the program because every element is shown tiny, almost unreadable.

Fortunately, some time ago, Microsoft released new programmer tools to build user interfaces (WPF and XAML) that scale gracefully across different screen sizes and pixel densities. The latest version of ScriptFTP (v4.1 and still under development) has been built using these tools and looks much better on modern computers. Take a look at the difference, older version on the left, new version on the right:

 

 

If you want to try the beta version feel free to drop an email at support@scriptftp.com . Most of the things are already working except the script scheduler.