I was delighted when BC3 added the ability for sessions to use environment variables. For example,
left folder %userprofile%
right side d:\backups\%username%
When opening the session, the environment variables are expanded into the correct paths and the folder comparison is performed. Beautiful!
Is there any chance this capability could be expanded to use Command Extensions in Windows? For example:
With Command Extensions enabled, %date:~0,3% gives the first three characters of the %date%, thus returning the day of week (Sun, Mon, Tue, etc.) This would allow having a *single* session that would work for each day of the week:
left folder c:\some_folder
right folder d:\backups\%date:~0,3%
I currently accomplish this by running a batch file in which I set an environment variable as follows:
set dow=%date:~0,3%
In the batch file, I also assign a data directory and a backup directory. Then, in a beyond compare script, I use something like this:
load %data_dir%\ %backup_dir%\%dow%\
Works great! The trouble is that sometimes I want to view the same comparison interactively using a saved session. I've found no other way to do it but to create 7 sessions -- one for each day of the week. It works, and since I once the sessions are setup, it's not too bad unless I want to changes the name filters (or something else) in ALL 7 sessions.
As noted above, Command Extensions would allow one session to handle the current day as determined by the environment.
Thanks for you consideration.
Kind regards,
Rick
left folder %userprofile%
right side d:\backups\%username%
When opening the session, the environment variables are expanded into the correct paths and the folder comparison is performed. Beautiful!
Is there any chance this capability could be expanded to use Command Extensions in Windows? For example:
With Command Extensions enabled, %date:~0,3% gives the first three characters of the %date%, thus returning the day of week (Sun, Mon, Tue, etc.) This would allow having a *single* session that would work for each day of the week:
left folder c:\some_folder
right folder d:\backups\%date:~0,3%
I currently accomplish this by running a batch file in which I set an environment variable as follows:
set dow=%date:~0,3%
In the batch file, I also assign a data directory and a backup directory. Then, in a beyond compare script, I use something like this:
load %data_dir%\ %backup_dir%\%dow%\
Works great! The trouble is that sometimes I want to view the same comparison interactively using a saved session. I've found no other way to do it but to create 7 sessions -- one for each day of the week. It works, and since I once the sessions are setup, it's not too bad unless I want to changes the name filters (or something else) in ALL 7 sessions.
As noted above, Command Extensions would allow one session to handle the current day as determined by the environment.
Thanks for you consideration.
Kind regards,
Rick
Comment