Sysax Product Forums / Sysax FTP Automation / General Discussion / Copy to timestamped folder
Posted:  17 Jun 2011 00:46
I'm not sure if I'm doing it the easy way but right now I have a Windows scheduled task that runs a simple batch file to create a new folder with a name equal to the time stamp, so each folder is titled 2011-06-16 for example.
My ftp download works great and at the end I am trying to move the file into these date stamped folders.  The ftpmovelocal command works fine if I hard code the destination folder name but I can't seem to get the format right to append the date stamp name to the folder path.
I'm trying a bunch of combinations of this:
ftpmovelocal $rem_item.name, ~local_move_dest_path\~mystimestamp;
I'm just not sure if there is some syntax issue with where I need quotes and commas or if this just won't work.
I also set this info above in the script to match up the format with the folder name:
gettimestamp ~mytimestamp;
formattimestamp ~mytimestamp, "%YYYY%-%MM%-%DD%";

Any help or advice is appreciated.
Posted:  02 Sep 2012 03:08   Last Edited By: sysaxsupport
I suggest you save the destination path first into a variable, appending the timestamp before using the ftpmovelocal command.


You would need to generate the complete path string before you use it with the ftpmovelocal command.
eg. stringjoin ~tspath, ~local_move_dest_path, "\\", ~mytimestamp;
__________________
-------------------------------------------------------
Secure FTP Server and FTP Script Automation Solutions
 

Copyright © 2021 Codeorigin, LLC - All Rights Reserved.
XML RSS 2.0 XML Atom 1.0