Renaming bulky files and move to another folder

Hi, I am facing an issue, where I have multiple file in a folder and I want to use timestamp and move to another folder.
I have applied the approach where I give the source folder name and the use the timestap with the destination folder path with giving 1 sec delay is not working. Only it rename the first file when it loop for second file it say file is already exisiting.
@lakshman @Palaniyappan

2 Likes

fine
kindly follow the below steps that culd help you buddy
–use a assign activity like this
out_filepath = Directory.Getfiles(“yourfolderpath”,"*.yourfileextension")
or
out_filepath = Directory.Getfiles(“yourfolderpath”)
where out_filepath is a variable of type array string @balkishan
–then use a for each loop and pass the above variable as input and change the type argument as string
–then inside the loop use a move file activity

1 Like

same I given bro, even it rename the first file with timestamp but for second it say file is already existing.
I have to use the timestamp bro. Always I am moving the same name file, I have 5 files with the diff name again I got next file with diff name. like file name A,B,C,D and E. Next time I will get the file A,B,C,D and E so on…Hope you understood.

1 Like

Fine
include seconds buddy like this in destination part of move file
"the folderpath you want"+"\"+“yourfilename”+"_"+now.tostring(“dd_MM_yy_hh_mm_ss_tt”)+".fileextension"

Cheers @balkishan

1 Like

or you can try this as well to include the string
now.ToString(“yyyyMMddHHmmss”)

Already given the timestamp bro.
image

@amarasto

It should be like this buddy @balkishan
now.ToString(“dd_MM_yyyy_hh_MM_ss_tt”)

1 Like

Kindly share the xaml if possible buddy
Cheers @balkishan

1 Like

It’s renaming one but when it come for second it says that already there

1 Like

Fine add a delay next to move file activity buddy
but usually without delay itself that should work…i think your machine is very fast…:slight_smile:fine
include a delay with value like 00:00:05
Cheers @balkishan

buddy it shows

kindly share with project.json file and all together in a zipped folder if possible buddy
Cheers @balkishan

still same buddy
include project.json file along with xaml and zip it and send buddy
Cheers @balkishan

1 Like

did you check bro, I already shared with you in one to one.

Checking buddy
onee min pls
@balkishan

Okay no problem :slight_smile:

1 Like

still i get the same error only buddy
think there is some issue with my studio
no worries whatever may be we need to mention like this move file destination property
now.ToString(“dd_MM_yyyy_hh_mm_ss_tt”) \as mentioned earlier
may be in addition and to safer side add a delay activity next to the move file activity with a time stamp like this
00:00:05

this would work for sure buddy
Cheers @balkishan

1 Like

hope this applies here as well

Cheers @balkishan

1 Like

Thanks @Palaniyappan

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