timestamping log files
5 posts
• Page 1 of 1
timestamping log files
Is it possible to modify the timestamp.vbs given to timestamp log files?
Thanks
Ian
Thanks
Ian
- mccaa-metrology
- Newbie

- Posts: 3
- Joined: Wed May 02, 2012 9:37 am
Re: timestamping log files
Not from within the program, no - although it will work from the Programs > Run Before section's Test OK - because when the profile is run for real, the program will have already deleted the log file/s you want to rename (let's say Profile_Name_Log_Page1.html) before the Programs > Run Before section (thus, the script) is invoked. So it won't find anything to rename, and your file is already gone. And no, you can't run it afterwards or it will rename the file before you have a chance to see it (plus, the program could never open it again afterwards due to the rename)
For a stand-alone trigger (for example a shortcut or batch file), you could use it as written, thus (in Win7)
"C:\Program Files (x86)\2BrightSparks\SyncBack\timestamp.vbs" "C:\Program Files (x86)\2BrightSparks\SyncBack\Profile_Name_Log_Page1.html"
(preface with cscript or wscript if appropriate)
This will work as-is for profiles that generate one log page - the problem is (if using HTML logging) when they generate two or more. How do you pass the multiple names? And how do you know how many there were last time?
You could use it with TXT log files fine - but with HTML logging, I guess you'd need to figure out something special if multi-pages are involved, which is outside the scope of 2BS support. All I will say is that there's nothing stopping you calling the same script multiple times with a different argument each time - but not with multiple arguments on one command-line.
Anyone else is free to chime in, obviously
For a stand-alone trigger (for example a shortcut or batch file), you could use it as written, thus (in Win7)
"C:\Program Files (x86)\2BrightSparks\SyncBack\timestamp.vbs" "C:\Program Files (x86)\2BrightSparks\SyncBack\Profile_Name_Log_Page1.html"
(preface with cscript or wscript if appropriate)
This will work as-is for profiles that generate one log page - the problem is (if using HTML logging) when they generate two or more. How do you pass the multiple names? And how do you know how many there were last time?
You could use it with TXT log files fine - but with HTML logging, I guess you'd need to figure out something special if multi-pages are involved, which is outside the scope of 2BS support. All I will say is that there's nothing stopping you calling the same script multiple times with a different argument each time - but not with multiple arguments on one command-line.
Anyone else is free to chime in, obviously
- Dave Wilkins
- 2BrightSparks Staff

- Posts: 6975
- Joined: Thu Jan 04, 2007 10:02 am
Re: timestamping log files
Hi Dave. First of all thanks for the helpful reply. The suggestion works like a charm. However, shouldn't the timestamp be applied even when the profile is scheduled?
Thanks,
Ian
Thanks,
Ian
- mccaa-metrology
- Newbie

- Posts: 3
- Joined: Wed May 02, 2012 9:37 am
Re: timestamping log files
I've no idea which suggestion you are using, as I specifically said it won't work from within the program (the Test will work, but not when run for real, because by the time it is triggered 'live', the previous log file has already been deleted in readiness for a new one).
I did say you could run the script from a shortcut or batch file (manually), but no idea if you are trying to, or how you arranged for that to happen on a Schedule.
I did say you could run the script from a shortcut or batch file (manually), but no idea if you are trying to, or how you arranged for that to happen on a Schedule.
- Dave Wilkins
- 2BrightSparks Staff

- Posts: 6975
- Joined: Thu Jan 04, 2007 10:02 am
Re: timestamping log files
My bad. sorry Dave. Got mixed up 
- mccaa-metrology
- Newbie

- Posts: 3
- Joined: Wed May 02, 2012 9:37 am
5 posts
• Page 1 of 1
Return to SyncBack V3 (freeware)
Who is online
Users browsing this forum: No registered users and 1 guest