Thema: Delphi Filename AutoInc name

Einzelnen Beitrag anzeigen


Registriert seit: 11. Feb 2007
97 Beiträge
Delphi 7 Enterprise

Filename AutoInc name

  Alt 17. Okt 2008, 21:01
Hi every body , my application needs to Create each time - after a specific event - a Log file , But what i want is that the new created Log file name will be like this : 00001.log // then 1 will be auto-inc each time the new log file is created .

So for the first execution my application will ensure that the 00001.log already exists , if this Log file (00001.log ) exists then it will create a new log file 00002.log and so on ( the 00001 will be auto-incremented like this 00002 or 00003 ...etc )otherwise it will create 00001.log .

as a summary : if 00001.log exits then Create a new file 00002.log , if 00002.log then a new with 00003.log ...etc . but if 00001.log doesn't exist then create 00001.log .

many thanks
  Mit Zitat antworten Zitat