Let me start off by explaining the data flow for our timimng system. We have three computers. One for Hy-Tek, one for capturing FinishLynx images and one for revieiwing FinishLynx images. The meet management, seeding scoring and results, is all done on the Hy-Tek computer. The timing, FinishLynx, is all done on the Finis Lynx computer.
On the FinishLynx computer a local folder is shared on the network. The Hy-Tek computer exports the start list to this shared folder. The FinishLynx software was developed by a software testing company that reads from this directory and saves race files back to this directory. If a race needs to be reviewed the third computer reads the files over the network.
To keep things organized I like to have a directory for each meet. I name each directory in the following fashion: yyyy-mm-dd – name or 2011-10-01 – Charles Bowles. For everything to work all three computers need to be pointed to that directory. If the directory changes all the computers have to be changed. To make things more efficient, I use a working directory with a constant name. After the meet is over I archive the fold with the naming convention explained above.
To save some keystrokes I’ve created a script to do the archiving process. After a meet I simply run the script. I’m promted for a name and then the meet files are archived and everything is set for the next meet.
If you would like to use the script simply copy the script below into a text editor like notepad. Save the file as “Archive.vsb”. Make sure to use the quotes or the file will be saved as Archive.vbs.txt.
I hope this helps someone. If you have questions leave them in the comments.
'======================================= '== Archive Script == '======================================= 'Current year folder dir = "2011-12" 'Root Directory root_dir = "D:Finish Lynx" 'Working Directory working_dir = "Active Meet" ' ======================================= ' == DO NOT EDIT BELOW THIS LINE == ' ======================================= 'Prompt for name of the archive folder archive_folder = UserInput( "Enter archive folder (yyyy-mm-dd - name):" ) 'Define the destination archive folder archive_folder = root_dir & "" & dir & "" & archive_folder 'Move active folder and rename Set objFSO = CreateObject("Scripting.FileSystemObject") objFSO.MoveFolder root_dir & "" & working_dir , archive_folder 'Recreate active folder set objShell = CreateObject("Shell.Application") set objFolder = objShell.NameSpace(root_dir) objFolder.NewFolder working_dir 'Display archived confirmation WScript.Echo "Archived to: " & archive_folder Function UserInput( myPrompt ) ' This function prompts the user for some input. ' When the script runs in CSCRIPT.EXE, StdIn is used, ' otherwise the VBScript InputBox( ) function is used. ' myPrompt is the the text used to prompt the user for input. ' The function returns the input typed either on StdIn or in InputBox( ). ' Written by Rob van der Woude http://www.robvanderwoude.com ' Check if the script runs in CSCRIPT.EXE If UCase( Right( WScript.FullName, 12 ) ) = "CSCRIPT.EXE" Then ' If so, use StdIn and StdOut WScript.StdOut.Write myPrompt & " " UserInput = WScript.StdIn.ReadLine Else ' If not, use InputBox( ) UserInput = InputBox( myPrompt ) End If End Function