09-01-24 08:47 AM
Hi guys,
I'm having trouble with opening a downloaded Excel file.
I have 2 files here, which have the same name, and same date but different times (date and time will be varied when downloading the file). I want to open the old Excel file, which is the xxx10.36.31.xlxs
My steps are: to get the file and sort the order to get the old file. Then, the next step is to open the workbook, but at the file name row, I don't know what I should do to get the old file name...
p/s: since the date and time will be varied, I have to open the oldest file of the day I download it.
Can you please show me steps? Many thanks.
------------------------------
Mia Mikela
------------------------------
09-01-24 12:52 PM
Use the Utility - File Management object to get the names of files in the Downloads folder. Then loop through the collection to find the file you want.
Alternatively, delete/move any old files in the Downloads folder first, then download. That way you'll know that the new file in the Downloads folder has to be yours.
09-01-24 01:11 PM
Hi Mia,
Use File Management Utility to get the list of files from the folder where you have downloaded.
Then use Collection Manipulation Utility to Sort the collection based on "Created" field. you can sort and loop the collection to open the oldest file in your folder.
Please let me know if you have any issues on this.