0

I am doing a project and it requires to create file sequential.

Is it possible to create File sequence, starting from 1 for each new date and increase depending on total file per day?

Something like:

Today:01.txt, 02.txt, 03.txt

Tommorow: 01.txt, 02.txt, 03.txt .....

I have no idea how to start.

  • 1
    It is a little bit unclear what you want to do. Something like: today: 01.txt, tomorrow: 02.txt, ... ? Meaning one per day? Or something other because the "total file per day" seems to contradict it. – ssindelar Jun 03 '15 at 08:03
  • you can store your counter/sequence variable in database , then just : **fetch `--> ` Use `-->` Increment `-->` Store Back** – Neeraj Jain Jun 03 '15 at 08:07
  • Hi Casey, I'm sorry i'm not define my question clearly .......What i want is eg. today 01.txt, next create 02.txt tomorrow 01.txt, next 02.txt, 03.txt per day might can up to 50.txt second day will start from 01 again~~ Thanks – Chris Chang Jun 03 '15 at 08:10
  • Hi Neeraj, do we have other way but try not touch on database? Btw this is a good idea.. – Chris Chang Jun 03 '15 at 08:14
  • You mean something [like this](http://stackoverflow.com/questions/18324203/screenshot-saving-as-autogenerated-file-name/18324758#18324758) – MadProgrammer Jun 03 '15 at 20:28
  • Hi guys, Thanks for the all ideas, the problem was solved. I'm using Neeraj's idea. Store the sequence variable in database, and it work very well. Thanks – Chris Chang Jun 08 '15 at 02:40

0 Answers0