How to save the different download report file (with different date) to c file by dynamically (one by one) in uipath?

studio
#1

my workflow is as below:

but it show this error to me
03

it mean i cannot download first file and save to c file
then, i download second file and save to c file

who can help me to solve this error? thank you.

my report will be download after i press submit. I can input different start date and end date ,then the result of report will be different. Then, how can i save this different downloaded file to c file as i input different start date and end date?

#2

Hi @jiejie

In order to use the Move File activity, the files you are trying to move should not exist in the destination folder.

For example, if you are trying to move a file with a name “aaa.txt” to your destination folder, and if that folder already contains a file with that name, it will throw an error… make sure your destination folder do not have those files and try again…

Let know how that goes for you

#3

@jiejie,

For Move File activity, mention below destination path:

“C:\Timesheet\Filename_”+datetime.Now.ToString(“ddMMyyyy-hhmmss”) +".xlsx"

#4

@Lahiru.Fernando Yes. When i delete my destination folder , it work. But everytime when i download that report , it file name will same with the one move to destination file. So, this mean i need to delete destination file which have the same name as downloaded one my program will just run ? Thank you.

#5

@lakshman thank you. But i want the download file have the date and time which are same as what i input for input dialog one, not the date and time when i download. Can i make it ? Thanks

#6

@jiejie,

Yes, it’s possible. Store input dialogue box result in variable and pass here.

#7

Hi @jiejie

Yes… so basically when you have a file with the same name of a new file that you are trying to move, it will give that error. So what you need to do is, you can either move that file to another archive or some folder and then move the new file to the required folder so that it will not get conflicted. Other way is to delete the existing file that has the same name as your new one before moving the new file to the folder.

Just a thought on yours and @lakshman conversation. If you use the date and time as lakshman mentioned in his previous post, the chances of getting such conflicts is quite low because you have the time as well for the file name. In case you are using a date and tims that you provide instead of the actual download time, you will need to make sure the files under the same name does not exist when you use the move activity

1 Like
#8

02 @lakshman may i knw why it come the result name like this but not the input dialog that i input? The first file. i input file name as Timesheet Report 1 - IT PMO - 2019-01, but it become 05499900

#9

@Lahiru.Fernando noted and thanks.

1 Like
#10

@jiejie,

Try Below one:

“C:\Timesheet\Filename_”+inputDialogueOutputVariable+".xlsx"

Note: inputDialogueOutputVariable is of string type and it is the output of your inputdialogue box.