Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New Week, New folder

Status
Not open for further replies.

Finnerbahce

Technical User
Sep 29, 2005
12
IE
My program creates a log which increments daily. How do I create the log so that it'll create a folder for that week and then put the daily files for that week in that folder and the same for month and year?
 
I realise this is my third thread but I decided to split all threads so that it would be easier when others want to search
 
Did you wnt the folder to just say "week1", "week2", etc? Or did you want it to actually reflect the current date? If it's just the week1 week2 thing, then just have a counter that increments everytime it creates a folder. If you want it to actually show the date, then I would just mess around with the DATE constant. I would pull the current date, then start using the string formatting code to play with that and try to extract the year and month from it....
 
That sounds lovely keybrdcowboy but unfortunately I'm no a programmer. this is a part of my program I'm not too bothered about to be honest. My current setup writes my output to a file as is. I just wanted to organise it. I'm a complete novice at this stuff so unfortunately what's there is easier said than done. Thanks for the help though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top