Pdf not pick order wise

Hi everyone,

I have a pdf file having more than 1700 pages, the file name is “input”
I split the pdf and named it input_1,input_2…input_1700.

the problem starts after that,
when I going to read pdf one by one, it’s not taken the file orders,
it’s taken as input_1, input_10, input_11,12…19, input_100, input_1000, input_2
->how to read pdf orderwise, input_1, input_2…last

You may consider using the below expression:

Directory.GetFiles(“strFolderPath”,”*.pdf”).OrderBy(function(d) New FileInfo(d).CreationTime

Also you can try renaming with a different convention too, but suggested approach is above one.

image

Sorry, missed a tiny little ) at the end to close the function call.

Directory.GetFiles(“strFolderPath”,”*.pdf”).OrderBy(function(d) New FileInfo(d).CreationTime)

Output would be of type IEnumerable → You can find this datatype easily, screenshot below for reference

image

thank you

1 Like

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