1. Forside
  2. How To
  3. How To timestamp downloads

Skriv ut artikkel

Artikkel 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. 


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 Backup.cmd from the %ProgramFiles(x86)\%SmartFTP Client SDK\Samples\TransferQueue\AddToQueue folder
  2. Update the values in the Backup.cmd:
  3. Run the Backup.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 backup.cmd at the times you desire


Beslektede artikler
icon AddToQueue command line tool

What do you think about this topic? Send feedback!