Create a Login-Message with Recently Uploaded Files

Let’s say you want to create a login-message for a ftp-user, to display the most recently uploaded files. Commonly this is called a “Message-of-the-Day” aka MOTD.

First, you’ll need to setup a directory structure for your BPFTP Server installation. I commonly create a “bin” directory and then go from there. Here is a write-up on setting up directory structures.

Next, you’ll want to create a batch-file with the following lines (save this to your “bin” directory as “event-fileuploaded.cmd”:

@echo off
echo %DATE% %TIME% – File Uploaded [%1] for %2 bytes >> c:\ftp\motd.txt

Thirdly, you’ll need to connect this batch-file to the “OnFileUpload” event under the “Events Manager” in BPFTP Server (Ctrl-E). Scroll down until you see the event, then Check-ON the option “Execute” and put in the following command-line:

c:\ftp\bin\event-fileuploaded.cmd %FILE %FILESIZE

Lastly, you need to edit the user which can see the MOTD in “User Accounts” (Ctrl-U) and click on the ftp-user and then “Links & Messages”, Check-ON the “Show Login Message” and type in “c:\ftp\motd.txt” for the file to display.

That’s it! You can test this by logging into the ftp-server, upload a file and then log-in again to see the MOTD!