Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

sakthivel

Script for Renaming the file in local Folder

Dear All,
I have the daily file with name like Sales 12-02-2014, Sales 13-02-2014,
Sales 14-02-2014,Sales 01-03-2014. I want to auto upload from ftp to local machine with file name as maximum of date per month. That is Sales-Feb-2014 and Sales-Mar-2014 and old file in local folder to replace with new files.. Please help ASAP.

I have given the script as

option batch continue
option confirm off
Open "Session"
Lcd "Local Folder(ie E:\")
get "Remote Folder(/Home/folder/*Sales*.CSV>1d" )
Close
Exit

It is coping only last updated date but not replacing old one per month. If old files is 31-Jan-2014, new one is 01-Feb-2014. Than 31-Jan-2014 could not delete. If Old file is 01-Feb-2014, new file is 02-Feb-2014. now 02-Feb-2014 to be replace with 01-Feb-2014 and not with 31-Jan-2014.

Thanks in advance,
Sakthivel.S