date stamps on WPOT files - how do I script for removal

Options

There are 6 files I get back daily and all but one of them has a date stamp.  I have a fully automated process for sending and receiving the files and storing the results in a SQL DB with the file that does not have the date stamp.

I now want to use the results file which has a date stamp and need to write a script to remove the date stamp so I have a file with the same name each day for my automation.   

  (I never had to script for an issue where the name is different each day because of the date stamp and BB won't put the files on the ftp site without the date appended) 

Example: 

 LPFCH_Daily_WPOT_results_0129.csv  file needs to be:  LPFCH_Daily_WPOT_results.csv

 I have my ftp script put all 6 files in an empty folder, now I need to read all the files names to find the one I want and then remove the date stamp.  If you already wrote a script for this I would love to see it.

Thanks, Jeff

 

Comments

  • Anonymous Blackbaud User:

    There are 6 files I get back daily and all but one of them has a date stamp.  I have a fully automated process for sending and receiving the files and storing the results in a SQL DB with the file that does not have the date stamp.

    I now want to use the results file which has a date stamp and need to write a script to remove the date stamp so I have a file with the same name each day for my automation.   

      (I never had to script for an issue where the name is different each day because of the date stamp and BB won't put the files on the ftp site without the date appended) 

    Example: 

     LPFCH_Daily_WPOT_results_0129.csv  file needs to be:  LPFCH_Daily_WPOT_results.csv

     I have my ftp script put all 6 files in an empty folder, now I need to read all the files names to find the one I want and then remove the date stamp.  If you already wrote a script for this I would love to see it.

    Thanks, Jeff

     

    I contracted with an vendor that writes automation scripts and solved this issue.  My only issue left is the ftp script for the initial final transfer from BB to my server.  I am trying to get the post transfer delete command to work, but no luck yet. 

    Is anybody else able to have their script pickup the files and then delete them all off the ftp Out folder?  I don't like leaving the files on the site and manually deleting them is not a good use of time.

     

    Thanks, Jeff 

Categories