How to follow a sequence while uploading files from file directory?

how to follow a sequence while uploading files, for example, I have 25 images, and I have renamed them from, 1 to 25 but when I run UI path for uploading them, it
is uploading randomly, like it upload first 1 image then 10th image then 11th etc., so I want to follow a sequence from 1 to 25 consecutively, so can anyone help me please, see attached screenshots.


Thanks, Regards
Deepak

Hi @Deepak_Gautam - Please try this…

Directory.GetFiles("YourFolderName","*.png").OrderBy(Function(d) cint(path.GetFileNameWithoutExtension(d))).toarray

This will put the files names in order…

Please refer this link below…

Hope this helps…

Can you check these i have variable that is path

Main.xaml (26.5 KB)

Thanks

@Deepak_Gautam - I downloaded your xaml and i couldn’t find the code shared there…

First I would suggest to try and let us know if you face any errors…In your case , you have to code as below…

  Directory.GetFiles(Path,"*.png").OrderBy(Function(d) cint(path.GetFileNameWithoutExtension(d))).toarray

Thanks lot Brother It’s working

1 Like

@Deepak_Gautam - thanks for confirming. Once you complete the testing please mark my post as solution so that others will be benefited.

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