How to get an integer name zip file?

Hello community!

In this scenerio i want to move only one downloaded zip file from download path to destination path and daily the file name is like this example-10082023.zip,11082023
It is in date format how can i dynamically select only that date file?

formattedDate=Now.ToString(“ddMMyyyy”)
Move file activity:
sourceFilePath=Path.Combine(sourceFolderPath, formattedDate & “.zip”)
destinationFilePath=Path.Combine(destinationFolderPath, formattedDate & “.zip”)

Hi @Priyesh_Shetty1 - Try below steps

  • Take Path Exists activity to check the file present or no. Path value could be
"C:\users\downloads" & Now.ToString("ddMMyyyy") & ".zip"
  • The above activity returns True if the file exists
  • If True, then take Move Activity to move from Source to Destination

Hi @Priyesh_Shetty1

Use assign Activity and place it in that

System.IO.Directory.GetFiles(SoucreFolderPath).OrderByDescending(Function(a) New FileInfo(a).CreationTime).First

This gives you the recent File

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.