The power of scripting (aftJS) for your automated file transfer

6 min readJul 27, 2020

In a world where quadrillions of files are exchanged daily, the importance of automation cannot be understated. Whether you deal with a dozen file transfers a week, hundreds a day, or even more, you simply can’t excuse the need for automation. Companies that have embraced this concept all concur it is a crucial element, especially if you’re aiming at better productivity.

The benefits of automated file transfer stretch from reduced user errors to increased efficiency due to the freeing up of manual time spent by employees. More importantly, the automation of file transfer improves reliance in terms of file delivery to the intended destination.

That said, there’s only so much that traditional file transfer solutions can achieve. A vast majority of traditional file transfer tools employ UI to allow interaction between users and devices. While UI makes navigation easier (it is visual), it also massively limits functionality. Enter scripting.

What is scripting

A script is simply a small interpreted program designed to automate the carrying-out a series of tasks. Scripts also use conditions to make decisions. Scripts can be started automatically (scheduled or specific event) or manually.

There are several scripting languages, and your choice depends on the tasks at hand and your inclination, although — as we will see throughout the rest of this post — not all scripting languages are equally capable of simplifying file transfer automation tasks.

How scripting is used

A typical work routine of an administrator involves carrying out a lot of tasks, most of them being repetitive. One of the most efficient ways to handle such tasks is by using scripting. Scripting automates administration tasks that need to be performed regularly — It could be every day or even a couple of times a day.

For some time now, network administrators have used scripting to rationalize their work. However, learning how to write useful scripts for these [networking] tasks is an uphill task. The process requires dedication, patience, and constant practice.

Scripts can still be used for non-repetitive tasks that only need to be carried out once. Say, if a network administrator wants to modify the registry to many servers that are widely distributed, he/she can use a single script. The script will be distributed on every server to run that task.

In automated file transfers, scripting opens up endless prospects to what you can achieve. You can automate almost everything by creating a script designed for that task. It helps realize and harvest the power of automation as scripting possibilities are limitless.

The advantages of scripting

Scripts help manage and carry out a lot of tasks with ease. Here are some of the benefits of scripting:

1. Saves time

As Benjamin Franklin puts it, ‘Time is money’ and ‘Lost time is never found again.’ Time is, well, everything in the corporate world. Being able to save time and use it elsewhere makes all the difference.

Scripts help save time by carrying out complex file transfer tasks. They can also be invoked automatically even without the intervention of the network administrator giving him/her time to handle other tasks.

2. Scripting saves money

They say, ‘There isn’t no such thing as a free lunch.’ While that may be the case, there’s certainly no mention of breakfast or supper for that matter.

As you probably have people that know how to create and run scripts in your organization, there’s no need to hire others. You can have the trained individual generate a script that will carry out the time-consuming routine file transfer tasks. It only takes a few hours to come up with an effective script, and you’ll be set.

3. Flexibility

As mentioned before, a script can make decisions based on set conditions. This feature allows them to respond to various conditions when used in the file transfer environment.

4. It’s “infallible”

Consistency is another great boon of scripts. Once written, scripts can be invoked many times, and each time, they’ll carry out the repetitive file transfer tasks effectively. Scripts are less prone to making errors compared to manually carrying out the task each time.

5. An efficient way to manage file movement tasks

Scripts have proved useful when it comes to creating, modifying, updating, moving, and even deleting files and folders on remote file servers. This makes them ideal implements where such processes need to happen regularly.

6. Operating systems have built-in schedulers

Scripts can be invoked automatically by direct scheduling through the UNIX or Windows operating system scheduler. This helps achieve the “set, forget, and wait for reports” status, which is one of the most desirable goals in the life of a System Administrator.

The downsides of scripting

1. Scripting languages are typically “too generic”

Most scripting languages are very generic, they’re designed to achieve a myriad of disparate tasks. That makes them flexible, yes, but also and often very cumbersome when it comes to tasks that are very specific in nature, like automated file transfer for example.

To our knowledge, at the time this article is being written the only scripting language specifically designed for automated file transfer is the aftJS language.

2. Scripts have to be managed

It’ll only be a matter of time after you start using scripts before there are plenty of them. You’ll have hundreds or more scripts running at your company. The more the scripts, the harder it becomes to manage them.

Scripts also need to be secured, which can be an issue if your company lacks the necessary tools. There is also the question of regulatory compliance as scripts may not be in line with requirements of industry Acts and standards. This could harm your firm in the long run.

Again, to our knowledge, at the time this article is being written, AFT! is the only software product that provides a single and unified repository for all of your automated file transfer scripts, while also ensuring their security and privacy.

Best approaches to file transfer scripts

Automating routine file transfer tasks using scripts can save your company a lot of time and resources. However, getting to that point requires massive effort. Below are some of the best practices that you ought to keep in mind when creating and running scripts.

Adequate planning in advance

Take some time to go through and understand all the requirements of the scripts. While at it also review the encryption that’s if files contain confidential data

Auditing is key

You already understand the importance of auditing. Therefore, when creating a script, remember you’ll need an audit trail for troubleshooting when file transfers don’t happen as expected.

Don’t forget error handling

Some of the crucial questions to ask yourself when writing a script are: What will happen if and when the network is down? What about when the server down? Will my script handle error conditions? These questions will help you create the perfect script.

Consider the future

When creating the script, consider infrastructure evolution. It is a good idea to create a script in a flexible way such that it can be updated in the future.


Scripting can be one of the most powerful weapons in a System Administrator’s arsenal when it comes to automating file transfer tasks. But not all scripting languages are created equal.

Try creating and maintaining a few dozens of file transfer scripts by using “shell scripting” for example. Hundreds of lines of unstructured code to achieve even the simplest of tasks, no single repository for all of your scripts, manually established “cron” rules to run them unattended, all of it while the scripts’ source code is accessible to anyone and unprotected.

Or you can try AFT! which provides a single, unified interface to manage all of your automated file transfer scripts, secure them, schedule them, keep track of their execution, report on them in real time… all of it backed by the power of a scripting language as familiar as JavaScript but with extensions exclusively designed for automated file transfer.




Here at Syncplify we simplify all file transfer and synchronization processes with our suite of skillfully designed software.