Link to home
Start Free TrialLog in
Avatar of RIAS
RIASFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Find the next number in the folder

Hello,
I have word files named as 1.docx ,2.docx ; need to find the next number as a string or find max number filename .
I am using vb.net desktop.
Cheers
ASKER CERTIFIED SOLUTION
Avatar of Kimputer
Kimputer

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RIAS

ASKER

Thanks! will try and brb
Avatar of RIAS

ASKER

Worked like charm!Thanks
Avatar of RIAS

ASKER

Hello Kimputer,
The problem here is if a number is deleted in the middle it can't find the max number then ?

Cheers
Avatar of Kimputer
Kimputer

Please explain again, or add example (reproducable with the code). It should find the max number NO MATTER what.

Ex. if files are:

1.docx
99.docx
99991001.docx

Result = 99991001

I have no idea wat "deleted in the middle is". I suspect you mean there are no files 2.docx through 98.docx, but that doesn't matter, it will still find the max.
Avatar of RIAS

ASKER

Yes, Kimputer you are right! Thanks once again.