ahmed4566
(Syed S Ahmed)
March 29, 2024, 11:11am
1
“S:\Accounting\Finance\RealState\LeaseExpirationRports\CY24\Q1\RealState Leases\Real Estate_Lease Expiration_Q1 as of 03.19.24.xls”
I have this path in the shared folder
where
“S:\Accounting\Finance\RealState\LeaseExpirationRports” is static and it will not change
CY24 will change in next year to CY25 manually by the user
Q1 can change to Q2,Q3,Q4 in CY24 and CY25 and so on.
RealState Leases this part of the path will remain same.
Latest file name I can get by order of descending of creation time.
File name also I can get from new filinfo(Path).name
Please help me to achive this so the bot can get the file path if any folder name changes
Can you try this way once
“S:\Accounting\Finance\RealState\LeaseExpirationRports\CY2*\Q*\RealState Leases”
vrdabberu
(Varunraj Dabberu)
March 29, 2024, 11:30am
3
Hi @ahmed4566
Try this:
"S:\Accounting\Finance\RealState\LeaseExpirationRports\CY*\Q*\RealState Leases\Real Estate_Lease Expiration_Q1 as of 03.19.24.xls"
Regards
@ahmed4566 ,
You will have to calculate the Quarter and Year for this dynamic file path and then prepare final file path.
Here is sample solution you can follow:
Code:
Workflow.xaml (7.5 KB)
Thanks,
Ashok
ahmed4566
(Syed S Ahmed)
March 29, 2024, 12:36pm
5
Thanks Ashok, I tried your flow
works fine , tbut the thing is the user is updating the file manaully on that path …so need to check the validation if the folder exist and file exist
then read the file by the bot
You can easily do that by this snippet.
Assign: folderExists = Directory.Exists(folderPath)
Assign: fileExists = File.Exists(filePath)
Thanks,
Ashok
ahmed4566
(Syed S Ahmed)
March 29, 2024, 2:50pm
8
Hi Ashok, I am trying to take the path from the shared folder and its in argument and I have placed argument there instaed of hard coded value and then I am trying to get the latest file from that folder
No need to pass strQtr
twice as you are requiring only once.
Also check the the directory path value once assign activity executes.
ahmed4566
(Syed S Ahmed)
March 29, 2024, 10:25pm
10
Thanks bro, It was my mistake as I was typing the path incorrectly…
1 Like
system
(system)
Closed
April 1, 2024, 10:26pm
11
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.