ftp automation

ScriptFTP

The professional tool to automate FTP, SFTP, FTPS and schedule FTP batch jobs

The forum is now read only. Please, go to the the main ScriptFTP website if you need help.
Need help writing a script? Have any question about ScriptFTP?
Hi,

I run a daily ftp transfer once a day.

Each day i want files downloaded to a different separate directory on my c:\

Is there anyway to use the LOCALMKDIR command to make a directory
with a different unique name each time the script is run?

Ideally i would want something like:

LOCALMKDIR "todays date"

If not, is there any other way to get SCRIPTFTP to create a different
local directory name each time a script is run?

Cheers!

Tom
FTP Script
  1. $aLocalDir = "C:\".GETTIME(FORMAT3)
  2. if(LOCALMKDIR($aLocalDir) == "OK")
  3.   bla-bla-bla
That's great thanks!

One other thought I have is...

Is there a way for ScriptFTP to return the number of files on the FTP prior
to it starting the download, and then once the download has completed can it
return the number of files in the local directory?

This way I can be sure the number of files on the local and remote location are the same.

Cheers!
FTP Script
  1. GETLIST($aRemoteList,REMOTE_FILES,"*.*")
  2. $aCountRemoteFiles = COUNTELEMENTS($aRemoteList)
  3. GETLIST($aLocalList,LOCAL_FILES,"*.*")
  4. $aCountLocalFiles = COUNTELEMENTS($aLocalList)
  5. if($aCountLocalFiles != $aCountRemoteFiles)
  6.   bla-bla-bla
Try to esteem to begin with section

http://www.scriptftp.com/d/ftp-script-for-windows-getting-started/your-first-script

Because I to copy therefrom examples to me it is not interesting...

Excuse for my English, I use the machine translator