Base de conocimientos
Modificado
How To timestamp downloads
Sometimes it is necessary to dynamically change the destination file/folder name. For example if you have a backup task scheduled which should put the files into a different folder each time it is started.
Tutorial
Part 1 - AddToQueue.exe Tool
In this part we are getting familiar with the AddToQueue.exe command line tool.
KB: AddToQueue command line tool
The syntax to upload a local folder looks like that:
AddToQueue.exe copy folder c:\temp\backup {AEB81A25-62AB-4FB6-B25B-2C2A3F58ECE4}/temp/backup
where {AEB81A25-62AB-4FB6-B25B-2C2A3F58ECE4} is the FavoriteId.
Now we need to figure out the FavoriteId.
Part 2 - FavoriteId
In this part we will figure out the unique FavoriteId for a particular favorite in SmartFTP.
KB: FavoriteId
Part 3 - Create Batch File
Since we now have all the information to use the AddToQueue.exe tool, we can build our batch file which dynamically sets the destination name.
- Start with the AddToQueue - Add date to destination folder.cmd
- Update the values in the .cmd file:
LocalDestination
FavoriteId
RemoteSource - Run the .cmd and verify that the correct item is added to the SmartFTP Transfer Queue.
Tip: It may be a good idea to temporary stop the transfer queue
Part 4 - Create scheduled task (optional)
In this part we are going to create a scheduled task in the Windows Task Scheduler which runs the Backup.cmd we have created in Part 3. If you already automate your process with a batch file, this is not required.
- Go to Control Panel - Administrative Tools
- Task Scheduler
- Create new task and run the .cmd at the times you desire
Palabras clave
timestamp scheduler AddToQueue
Artículos relacionados
AddToQueue command line tool
What do you think about this topic? Send feedback!