What I’m trying to do is move this file in the files folder into another folder inside of “files” called processed and rename the file as Processed_todays date Not having any luck. I tried this Path.GetFileName(“C:\Users\ShubzdJ\OneDrive - name\Documents\UiPath\VeridityBot\files\Processed”) + “_” + DateTime.Now.toString(“yyyMMdd”) + “.xlsx” and it moved the file out but not into the “processed folder” but into the main directory of the bot.
You just need to add new folder path.
Try this:
Path.Combine(“C:\Users\ShubzdJ\OneDrive - name\Documents\UiPath\VeridityBot\files\Processed”, “Processed”+“_”+DateTime.Now.toString(“yyyMMdd”) + “.xlsx”)
got an error - Move File: Could not find a part of the path.
Path.Combine(“C:\Users\ShubzdJ\OneDrive - name\Documents\UiPath\VeridityBot\files\Processed”, “Processed”+“_”+DateTime.Now.toString(“yyyMMdd”) + “.xlsx”)
Hello @jeff.shubzda
Please try the below path.
Path.Combine(“C:\Users\ShubzdJ\OneDrive - name\Documents\UiPath\VeridityBot\files\”,“Processed”+“_”+DateTime.Now.toString(“yyyMMdd”)+“.xlsx”)
If there isn’t folder with name Processed use this;
Path.Combine(“C:\Users\ShubzdJ\OneDrive - name\Documents\UiPath\VeridityBot\files”, “Processed”+“_”+DateTime.Now.toString(“yyyMMdd”) + “.xlsx”)
thank you for all the help
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.