General discussion

Locked

Check number increments in filelist box

By dvdza ·
Hi there, I have files located on my hdd that are sequencially numbered, i want to check for breaks in the sequence.

What I have so far: My app populates a filelist box with the files in the folder, i have determined the first and last files in the folder.

What I need: Now all I need is to run a loop to check that the increments are sequencial. If there is a break in the sequence then that filename must be placed in a "Missing Files" list box.

Eg of file names: abc000354 up to abc001264

I was going to use left(strFilename,3) to remove words, but i would prefer checking the entire file name, this will help if the files ever change eg: bcd00452 to efd00235

Would appreciate help on this one.

Thanks

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Tony Hopkinson In reply to Check number increments i ...

Needs some more rules.
If abc999999, is the next file abd000000 ?
Can there be abc... files and efg... files in the directory without abd... eff are they all missing ?
Sequence checking with alpha numerics is just a matter of calling the filelist box' sort method and then using the ascii value 'a' is 97 'b' is 98. '0' is 48 '1' is 49.

HTH

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums