“D:\RPA\RTA Files Download\Download Extracted Path\732021173B_4FDNLFFMUN7FLJOK9MFO7BHA9R2FC965450178571054BMB156730545R9C” this is my file path and i want to get a file from this path…but the problem is \732021173B_4FDNLFFMUN7FLJOK9MFO7BHA9R2FC965450178571054BMB156730545R9C only this folder name get changes daily…any dyanamic code to get a single file?
Take path till “D:\RPA\RTA Files Download\Download Extracted Path" in for each file in a folder & select include subfolders this will work dynamically
even if the folder name changes it will go inside in each subfolder & check for the file
you can try this
this will ensure latest folder is checked for the file you need
if found break the loop
you can aslo try with this
system.io.Directory.GetFiles("FolderPath","*",SearchOption.AllDirectories).OrderByDescending(Function(x) new fileinfo(x).CreationTime).First
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.