Hi all,
I have an issue with moving the file to desired folder. I downloaded file from website and want to movie to another folder with time. Please me with this
Hi all,
I have an issue with moving the file to desired folder. I downloaded file from website and want to movie to another folder with time. Please me with this
Assign downloadedFilePath = âC:\DownloadedFiles\file.pdfâ â Replace this with the actual path of the downloaded file.
Assign newFileName = âNew_File_â + Now.ToString(âyyyyMMdd_HHmmssâ) + â.extensionâ
Assign newFilePath = Path.Combine(âC:\YourDesiredFolderPathâ, newFileName)
Regards,
@ramshiva_reddy Use âWait for downloadâ activity
Here are the screenshots for the working.
@ramshiva_reddy
Suitable approches:
str_filepath = Directory.GetFiles(yourfolder_path,â*.txtâ).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Tolist(0)
Iâm getting an error as Index was out of range. Must be non-negative and less than the size of the collection.
How to solve this??
Check the extension that you given, that must be same as downloaded file extension.
@ramshiva_reddy
Try this one in assign activity
Directory.GetFiles(folder_path,â.xlsxâ,SearchOption.AllDirectories).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Take(1)
@ramshiva_reddy Try @Brian_Mathew_Maben solution . It worked Perfectly for me
Hello,
If there are 10 login credentials for the same URL after downloading and moving the file to the desired folder, I named it as âcompany_name+month+yearâ. I want the file to add as âcompany_name+month+year-1â and it should continue to 10.
@ramshiva_reddy Use a variable to hold the value and then increment it after every iteration. Then use âcompany_name+month-"+variable.ToString
@ramshiva_reddy so you want file name
As
company_name+month+year-1
company_name+month+year-2
company_name+month+year-3
company_name+month+year-4
company_name+month+year-5
âŚ
âŚ
âŚ
âŚ
Right?
Hello bro,
Thatâs right. I want in that format
@ramshiva_reddy
For this I suggest you to make an asset with int type and give it value 1.
Give file name during moving like this:
Folderpath+company_name+month+year+â-â+AssetValue.ToString
After moving file, increament the AssetValue and update back to Asset so it will get next time incremented value as 2 and so on
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.