alt236 Development

[Home] [Palm OS] [Mass Downloader] [Script Format]

Mass Downloader - Script Format

This is the format of the MassDL script file.

A massdl script is a file which when encounterd will cause massdl to  perform a number of actions.

It can have any name but its extension must be .dls.

massdl v1
//
// The following line will download the cupdate.pdb file
// and save it in the DCIM directory of the first card
DL http://currex.sourceforge.net/cupdate.pdb 1/DCIM
//
// The following line will download the cupdate.pdb file
// and save it in RAM
DL http://currex.sourceforge.net/cupdate.pdb RAM
//
// The following line will download the cupdate.pdb file
// and save to the default location for this DL
DL http://currex.sourceforge.net/cupdate.pdb
//
// The following line will download the testfile.tmp via FTP
// and save it at the root directory of the 2nd card
DL ftp://some.server.com/testfile.tmp 2/
//
// The following line will download the contents of the root FTP
// directory and save it at the root directory of the 2nd card
DL mftp://some.server.com/ 2/
//
// The following line will delete the testfile.tmp from the FTP
// server
RM ftp://some.server.com/testfile.tmp
//
// Download from an https server, providing a username
// and password.
DL https://username:password@some.server.com/testfile.tmp
//
// Download from a server which uses a non standard port
DL http://some.server.com:42/testfile.tmp 1/
//
// Finally, most cases together
DL ftp://anonymous:@some.server.com:42/testfile.tmp 2/
END

Any text below the END line is ignored.

 

The first line must always start with "massdl" otherwise the app will  ignore the file. The version string will be used to keep track of  changes in the formatting, and to avoid any possible file extension conflicts.

There can be any number of action lines but they must be formatted as follows:

ACTION URL_TO_BE_DOWNLOADED DOWNLOAD_LOCATION

Valid actions are:

  • DL - Download File
  • RM - Delete File (for ftp)
  • // - This line is a comment

The DOWNLOAD_LOCATION has to be formatted as follows:

<CARD_NUMBER>/<PATH>

The card number is automatically assigned by the OS to any VFS cards that are connected on the system.

The numbering starts at 1 which is normally the first card but on  systems with a built-in volume it is assigned to that. This applies even to palms where the built-in volume is hidden, such as the TX.

  • To download to RAM, write RAM as the download location.
  • If no location is entered MassDL will use the same path the script was downloaded to.
  • After the END bit, you need to hit enter otherwise there will be an error on  your error log (It can be safely ignored though and it wont affect the  program's execution).
  • The theoretical maximum of the script file is a bit lower than 32K, although I wouldn't push it that far.

Script Location:

The script file can be placed either on a remote server, or on the device's external memory.

In the second case, simply use the following URL format to point to it:

file://<CARD_NUMBER>/<PATH_TO_FILE>/<FILENAME>.dls

Wildcards:

 You can also use the following wildcards in the URL:

  • {YEAR} The current year (YYYY).
  • {YEAR2} The current year (YY).
  • {MONTH} The current digit month (M).
  • {MONTH2} The current digit month (MM).
  • {DAY} The current day of the month (D).
  • {DAY2} The current day of the month (DD).
  • {HOUR} The current hour (H).
  • {HOUR2}: The current hour (HH).


Home   Contact   Blog   Curriculum Vitae   Disclaimer

Mobile and Web Analytics