Topic "FTP Data Pull_Add 1 to file name on a nightly basis"

Advertisement

analytics123
Joined:
Posts:
1
Location:
MO

Topic "FTP Data Pull_Add 1 to file name on a nightly basis"

My remote directory currently has a number of zip files within it of which house 3 files. The zip files are numbered in order(ie DL0001.zip,DL0002.zip,DL0003.zip,etc.). Each evening a new zip is added increasing the file names number structure by 1. Within the zip file I have one single file that I need to get. The file within the zip folder has an extension of which increases in value by 1 each evening as well(ie filename.100, filename.101, filename.102, etc.).

I am wondering if there is a process at which I can:

1. get the most recent numbered zip file. I essentially want my script to increase the GET filename by 1 every time it runs. I do not want to utilize the 'last date modified' process of getting this due to the fact that there could potentially be other zip files out there with a timestamp similar to the zip files I need.
2. Unzip the file before transferring and access the file I need within
3. recognize the file within the zip based off of the +1 increase of the file extension on a daily basis. (ie filename.100, filename.101, filename.102, etc.).

To summarize, my end goal here is to access the root directory and unzip the most recent numbered zip file, unzip this file, access the most recently numbered file extension within and transfer this to my local directory.

Any help would be greatly appreciated.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,459
Location:
Prague, Czechia

Re: Topic "FTP Data Pull_Add 1 to file name on a nightly basis"

That's a way to specialized logic than, what you can expect from WinSCP to do for you.

You have to code it yourself.

Reply with quote

Advertisement

You can post new topics in this forum