Is it possible for macros to work with a shell script? I am trying to make a simple script like the following:
REM copy source destination
copy %1 %2
exit
I want %1 = c:\*.*
I want %2 = c:\Archive%YYYYMM%\
If I put those values in place of %1 and %2 then the %YYYYMM% just disappears. If I use params the macros in the destination don't get translated. What am I missing?
Shell Script
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
I am affraid, Schell script in unable to resolve macro variables in the script's body. However, if enabled "Translate macros" option, you may use global macro variables as script parameters. http://www.ks-soft.net/hostmon.eng/mfra ... m#udvmacro
In fact, you may use date & time macro variables as script parameters either. You just should specify correct macro variables. In your case, you have to pass c:\Archive%YYYY%%MM% as parameter. Please, do not forget to enable "Translate macros" option.
Regards,
Max
In fact, you may use date & time macro variables as script parameters either. You just should specify correct macro variables. In your case, you have to pass c:\Archive%YYYY%%MM% as parameter. Please, do not forget to enable "Translate macros" option.
Regards,
Max