Posted Sat, 26 Oct 2019 02:06:45 GMT by

Hello, 

I have a task that has to download 2 files and I have to verify that the 2 files have the same 4 numbers in the middle of the file name. I download the files daily and the 4 numbers change day by day.  Does anyone have any recommendations on how to pull just those 4 numbers out of the file name to compare them?

Thank you!

Posted Sat, 26 Oct 2019 03:41:12 GMT by

Hi Thayne,

There are several methods for this, but to provide the best methods, I did have some questions.

1) Are the file name lengths consistent?
2) Do they contain any static characters or strings, such "test_1234_test.txt" or "Account1234Report.txt"?
3) Are the numbers something that you can tell ahead of time, like a date or time?
4) Would it be possible to get an example filename?

Posted Sat, 26 Oct 2019 03:56:48 GMT by

Hi Justin,

Thank you for your response. I have just come across a method that I think will work for me. I am storing the file name in a variable and retrieving a substring of that variable to get the segment I need. 

Thank you!

You must be signed in to post in this forum.