Run Utility Command Action
The Run Utility Command action runs the built-in PlayIt CLI - PlayIt.Cli.exe, found in the PlayIt.Cli folder of your PlayIt Live installation - with the parameters you provide. It is typically used as a step in a scheduled event to get audio or log files into place, for example copying the newest recording into a folder, or downloading files from an FTP server, before another action imports them.
Parameters
- Name - a label for the command so you can recognise it in the actions list.
- Parameters - the command line passed to the PlayIt CLI: the command name followed by its options (see below).
- Wait for completion - when ticked, the scheduled event waits for the command to finish before running the next action. Tick this when a later action depends on the file being in place.
Each command writes its progress to the event log, and files are copied or downloaded via a temporary file that is renamed into place once complete, so a half-written file is never picked up by a monitored folder.
Available commands
copy-file
Copies a single file to another location.
| Option | Required | Description |
|---|---|---|
--source | Yes | The path of the source file. |
--destination | Yes | The destination folder, or a full file path. Missing folders are created. |
copy-file --source "C:\Recordings\latest.mp3" --destination "D:\Playout\Imports"
copy-newest-file
Copies the newest file in a folder to another location. Useful when an external system writes a new file each time and you only want the most recent one.
| Option | Required | Description |
|---|---|---|
--source | Yes | The source folder. |
--destination | Yes | The destination folder, or a full file path. |
--filter | No | A wildcard filter for which files to consider, for example *.mp3. |
--regex-filter | No | A regular expression filter, for example Part [0-9]+. |
--strategy | No | How "newest" is decided: LastModifiedDate (default), CreatedDate, or FileNameAlpha (reverse alphabetical - useful when files are named in a sortable format such as YYYYMMDDHHMMSS). |
copy-newest-file --source "C:\Incoming\News" --destination "D:\Playout\News.mp3" --filter *.mp3
download-ftp-file
Downloads a single file from an FTP or FTPS server.
| Option | Required | Description |
|---|---|---|
--host | Yes | The server host name. |
--port | No | The port number (default 21). |
--username | No | The username. |
--password | No | The password. |
--remote-file-path | Yes | The path of the file on the server. |
--local-file-path | Yes | Where to save the file locally. |
--encryption-mode | No | For FTPS: None (default), Implicit, Explicit, or Auto. |
download-ftp-file --host ftp.example.com --username user --password pass --remote-file-path /news/bulletin.mp3 --local-file-path "D:\Playout\bulletin.mp3"
download-ftp-directory
Downloads the files in a directory from an FTP or FTPS server.
| Option | Required | Description |
|---|---|---|
--host | Yes | The server host name. |
--port | No | The port number (default 21). |
--username | No | The username. |
--password | No | The password. |
--remote-directory-path | Yes | The remote directory to download. |
--local-directory-path | Yes | The local folder to download the files into. |
--filter | No | A wildcard filter for which files to download, for example *.mp3. |
--regex-filter | No | A regular expression filter. |
--encryption-mode | No | For FTPS: None (default), Implicit, Explicit, or Auto. |
download-ftp-directory --host ftp.example.com --username user --password pass --remote-directory-path /adverts --local-directory-path "D:\Playout\Adverts" --filter *.mp3
Pair this action with a monitored folder, or an Insert/Import External Log/Playlist action, to bring the copied or downloaded audio into your library or playout log automatically.