Currently i Have a Sequence in Uipath Studio, where i create a directory with the name " & now.tostring(“yyy-MM-dd”) so it changes names every day. Afther that in the same Sequence i Open the SAP Web Client and Dowload excell files. i need to move or copy those excel files to the created directory in the beginning of the sequence. but I dont know how to name the path. It keep giving me an error.
This is the path that i give it. and in the ouput you can see the error that it shows.
@athevan96 try storing the path of the directory into variable after creating the directory, so you can use the variable to move the file. If i am wrong please correct me.
When you will do "…Billing\A Daily Report\0 Historical\yyy-MM-dd” it will always create yy-MM-dd file and not a folder
You will need to pass the file names for both the cases
I’m having a hard time getting the file names
Do you maybe have a demo where i can see how its done correctly cause if been trying to solve this but i just dont understand what i have to do or how i link the variable’s to the path.
Ok @athevan96 I have a simpler approach that i have used previously.
What you have to is get rid of the double-clicks that you are doing -Ideal case its not required
Also you wont have to do a move or copy
So here here is what you do:
folderPath- path where u want to create currentDate folder and store your files
Create new string variable - downloadPath = Path.Combine(folderpath,Now.ToString(“yyyy-MM–dd”))
Create Directory - pass download path
Then you have your Open Browser
… a. Click 1 (your item)
… b. Delay
… c. Click 2 (export icon)
… d. Click 3 (Yes button)
… e. Click 4 (File tab)
… f. Click 5 (Save As)
… g. Click 6 (Browser)
… h. Here you add a Get Text activity and get the text from the File name field
First of all Thank you for your fast reply and thinking of ways to help
I’m going to try it right now. But with the 1. create new string variable - download path = Combine (folderpath, now. tostring(yyyy-MM-dd")). Do you mean i have to create a Variable and put the destination and file name in default? and what should the variable type be