Hey All,
Had a look through the forums and didn't find any mention of my specific issue.
Here goes,
I have a series of files that are being transferred across an FTP server. The file naming follows a predetermined format that was agreed upon by both parties on either side of the transfer. However, during the file transfer process, there is extra text that is added to the name of the file. How do I go about removing the 'extra text' from the file name to only have the predetermined format? IT has deemed that extra text necessary to ensure unique files are created in the destination folder, thus it cannot be removed by them.
Example of naming convention: LOWPOSITION17021601.csv - the numbers are a date plus a series number: yymmdd-01 (for future files of the same type received on the same day, the next file would have the ascending -02- series number)
The transfer process adds: JIM_JON_LOWPOSITION17021601.csv_20171216070405
I would like to remove the 'JIM_JON_' and '_20171216070405' prefix and suffix before importing the files (which have different information in each) to their respective tables. 'JIM_JON_' prefix will always be the same,for the suffix, I can identify that there is a date, the others numbers I cannot source. I will ask IT how they come up with that value.
Any ideas on where to start?
Had a look through the forums and didn't find any mention of my specific issue.
Here goes,
I have a series of files that are being transferred across an FTP server. The file naming follows a predetermined format that was agreed upon by both parties on either side of the transfer. However, during the file transfer process, there is extra text that is added to the name of the file. How do I go about removing the 'extra text' from the file name to only have the predetermined format? IT has deemed that extra text necessary to ensure unique files are created in the destination folder, thus it cannot be removed by them.
Example of naming convention: LOWPOSITION17021601.csv - the numbers are a date plus a series number: yymmdd-01 (for future files of the same type received on the same day, the next file would have the ascending -02- series number)
The transfer process adds: JIM_JON_LOWPOSITION17021601.csv_20171216070405
I would like to remove the 'JIM_JON_' and '_20171216070405' prefix and suffix before importing the files (which have different information in each) to their respective tables. 'JIM_JON_' prefix will always be the same,for the suffix, I can identify that there is a date, the others numbers I cannot source. I will ask IT how they come up with that value.
Any ideas on where to start?
