知识库

  1. 主页
  2. How To
  3. How To timestamp downloads
创建日期
修改日期

打印文章

文章 2608

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.

  1. Start with the AddToQueue - Add date to destination folder.cmd 
  2. Update the values in the .cmd file:
    LocalDestination
    FavoriteId
    RemoteSource
  3. 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.

  1. Go to Control Panel - Administrative Tools
  2. Task Scheduler
  3. Create new task and run the .cmd at the times you desire

关键字
timestamp scheduler AddToQueue

相关文章
icon AddToQueue command line tool


What do you think about this topic? Send feedback!