wait next call according to time schedule...
![Smile :)](./images/smilies/icon_smile.gif)
It already ran 3 times (3 days) but the variable is still showing up as <blank> in log files
To that extent I've understood correctly, your batch file will never end or start new. In this case you can't work with a global variable which would change during the run time of your batch file.
I am not sure if I got it properly, but I am not changing the variable. Only using it. Below is the sample code.
System variable: GLOBENV_CAT_OUTDIR_ARCHIVE_GV
Value: \\<folder share>\CAT\Out Archive\GLOBAL VISION BACKUP
Use is the bat file:
Code: Select all
move "%GLOBENV_CAT_OUTDIR_ARCHIVE%\catgvf01.dat" "%GLOBENV_CAT_OUTDIR_ARCHIVE_GV%\catgvf01_D_%newDate%_%TIME%.dat"
move "%GLOBENV_CAT_OUTDIR_ARCHIVE%\catgvf02.dat" "%GLOBENV_CAT_OUTDIR_ARCHIVE_GV%\catgvf02_D_%newDate%_%TIME%.dat"
move "%GLOBENV_CAT_OUTDIR_ARCHIVE%\catgvf03.dat" "%GLOBENV_CAT_OUTDIR_ARCHIVE_GV%\catgvf03_D_%newDate%_%TIME%.dat"
move "%GLOBENV_CAT_OUTDIR_ARCHIVE%\catgvf04.dat" "%GLOBENV_CAT_OUTDIR_ARCHIVE_GV%\catgvf04_D_%newDate%_%TIME%.dat"
%GLOBENV_CAT_OUTDIR_ARCHIVE% variable which was already there from the start is working correctly.
Below is the log:
Code: Select all
D:\Apps\CAT\com>move "\\<folder share>\CAT\Out Archive\catgvf01.dat" "\catgvf01_D_20100624_00741.dat"
1 file(s) moved.
D:\Apps\CAT\com>move "\\<folder share>\CAT\Out Archive\catgvf02.dat" "\catgvf02_D_20100624_00741.dat"
1 file(s) moved.
D:\Apps\CAT\com>move "\\<folder share>\CAT\Out Archive\catgvf03.dat" "\catgvf03_D_20100624_00741.dat"
1 file(s) moved.
D:\Apps\CAT\com>move "\\<folder share>\CAT\Out Archive\catgvf04.dat" "\catgvf04_D_20100624_00741.dat"
1 file(s) moved.