![]() |
Scheduled Task Help
Hi i need support with this scheduled task
rename("$logfile/$logname", "$logfile/backup/$logname" . date("d-M-Y", time()) . ".txt");; the issue is as follows 1) original filename from $logname is log.txt 2) after rename it become tenhbyuu.txt04-Nov-2012.txt so what im looking for is a solutions to do 2) renamed to tenhbyuu-04-Nov-2012.txt the reason i am using a $logname is to allow users to choose log name, i am am still looking to keep rename("$logfile/$logname", "$logfile/backup/$logname" in place |
I'm not sure I follow completely - you want to remove the ".txt" from the middle of the name? Maybe something like:
Code:
rename("$logfile/$logname", "$logfile/backup/" . substr($logname, 0, -4) . '-' . date("d-M-Y", time()) . ".txt"); |
Quote:
|
OK, sorry, there was a mistake in the code which I've fixed above. I think it would have created a file in the backup directory with a name starting with ".txt", which would be hidden on a linux system, so if you need that file it might still be there.
|
Quote:
--------------- Added [DATE]1352296655[/DATE] at [TIME]1352296655[/TIME] --------------- thank you once again kh99 :) it works now how i want it too :) |
All times are GMT. The time now is 05:29 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|