|%%j (beware %%J is not the same as this is one of the rare cases Windows is case sensitive) is an Internal Variable to be used when you code a For loop.|
Internal variables may be %%a up to %%Z and when coded directly at the prompt must be prefixed by just ONE %. To know more about For statements type For /? at prompt (the same for any other command you want to investigate - sometime you have to type command /? | more to control the scrolling).
Other types of variables are External and Environmental.
External variables are %1 up to %9 and are associated to command tail parameters (e.g. mybatch parm1 parm2 ...).
Environmental variables are defined by the Set command or by the operating system as %time%.
Variables are the root to code adaptative and really useful batch scripts.