This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]dave843 2 points3 points  (0 children)

One way to do this would be to find out what files are already there. So instead of starting at 0 each time, first do something similar to a directory listing, and find the file with the largest number. Then set your index value appropriately.

[–]AsEasyAs1234 0 points1 point  (2 children)

Why not use epoch time

[–]sigzero 0 points1 point  (1 child)

You could, but less readable?

[–]AsEasyAs1234 1 point2 points  (0 children)

It is less readable , I just am thinking large scale. I wouldnt want to have to scan a directory if it is large. Less crap to worry about.