LET>backup_path = f:\backups\MySQL
Month>the_month
Year>the_year
Let>filename = test_%the_year%%the_month%
Let>runcommand ="C:\Program Files\winrar\rar.exe" a -r %BACKUP_PATH%\%FILENAME% "C:\Program Files\Navicat MySQL\SecureDoc\*.*"
Let>MSG_STAYONTOP=1
MessageModal>filename
This script does not work. The problem is the variables do not expand.
If I single step through the script, Let>filename is ok - it gets assigned ok. But then it is not expanded in the line Let>runcommand=etc..
Even the message dialog MessageModal>filename does not work. It simply shows the word 'filename' in the dialog box - not the contents of the variable %filename%.
If I try the line
MessageModal>%filename%
what i see displayed is %filename%
Some variables not expanding
Moderators: JRL, Dorian (MJT support)
-
- Newbie
- Posts: 4
- Joined: Tue Feb 20, 2007 1:56 am
Yes - thanks. I just worked that out also. You would think that the editor would fix these sorts of problems. But now I know, it is no problem.Me_again wrote:You need to remove the spaces from either side of the "="
LET>backup_path = f:\backups\MySQL
Let>filename = test_%the_year%%the_month%
(It doesn't break it but it's less confusing if you stick the the same case for the variable names too.)
And as for the case of variables - I understand what you are saying - I was changing case trying to see if that was the problem.
Kerry
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Or with v9, if you like spaces, use Let>IGNORESPACES=1Me_again wrote:You need to remove the spaces from either side of the "="
LET>backup_path = f:\backups\MySQL
Let>filename = test_%the_year%%the_month%
(It doesn't break it but it's less confusing if you stick the the same case for the variable names too.)
See the help file topic "Ignoring Spaces - IGNORESPACES"
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?