You can use a command line Python script to send files and folders with FileSender. You’ll need:
- The command line tool
- Your API key.
- Configuration for the command line tool. This is optional; it is a custom file that includes the FileSender URL, your username, and your API key.
Prerequisites
To use the FileSender command line tool, you’ll need to have Python 3 or later installed on your device. Download the latest version from the Python site.
Download and set up the FileSender command line tool
- Go to https://filesender.aarnet.edu.au/clidownload.php in your web browser.
- Create a folder on your device to keep the command line tool in.
- Go to your downloads folder, find the
filesender.py
file you downloaded earlier, and copy it to the new folder. - If you want to use FileSender’s default client configuration – recommended so that you can avoid specifying every parameter in every command:
- Create a subfolder called
.filesender
For Windows, create this in your user folder, typically found onC:/Users/[your local username]
For macOS or Linux, create this in your user folder, typically found on/Users/[your local username]
- Go to https://filesender.aarnet.edu.au/clidownload.php?config=1 in your web browser.
- Go to your downloads folder, find the
filesender.py.ini
file downloaded, and copy it to the new.filesender
folder.
- Create a subfolder called
Find your API key
If you choose not to use the default client configuration file, you’ll need to retrieve and specify your API key explicitly in each command.
To retrieve your API key:
- Click My Profile on the side navigation panel.
- Copy the long string displayed in the Secret field.
Send files from the command line
If you’re using the default configuration file, send files using this command:
python filesender.py -r [email] [files]
where
[email]
is the email address of the recipient.
[files]
is the locations and names of the files you’re sending, separated by a space.
If you’re not using the default configuration file, send files using this command:
python filesender.py -u [username] -a [API key] -r [email] [files]
where
[username]
is your FileSender username – typically your institute email address.
[API key]
is the API key you retrieved from FileSender earlier.
[email]
is the email address of the recipient.
[files]
is the locations and names of the files you’re sending, separated by a space.
You can also find information about optional command line parameters using the inbuilt help:
python filesender.py -h
Note: If you have multiple versions of Python on your device, you might need to run the filesender
command using a specific python3 command instead.