@echo off echo Moneydance has created a backup file. This will rename that file and will echo append the current time to in it military format. please wait a short time rem this is needed to properly trim leading whitespace from the time setlocal enabledelayedexpansion rem first get the current time in military format For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set mytime=%%a%%b) rem the 1st argument is the full name of the file created. this is {5} in rem the FolderMonitor program. set src=%1% rem the 2nd argument is the file name only of the file created. this is {1} in rem the FolderMonitor program. set dest=%2% rem strip leading white space which can be left if the time is less than noon. for /f "tokens=* delims= " %%a in ("%mytime%") do (set mytime=%%a) rem create the new file name set dest=%dest%.%mytime% rem wait for 20 seconds to give moneydance time to complete its file work ping 127.0.0.1 -n 20 > nul rem do the rename rename %src% %dest% rem let the user know it is done - the following can be removed if you want echo done pause