@echo off
set "obj[0].source=C:\Users"
set "obj[0].dest=C:\Users\a"
set "obj[0].file=x.txt"
set "obj[1].source=C:\Users"
set "obj[1].dest=C:\Users\b"
set "obj[1].file=y.txt"
setlocal enableDelayedExpansion
for /l %%i in (0,1,1) do (
robocopy "!obj[%%i].source!" "!obj[%%i].dest!" "!obj[%%i].file!"
)
pause
how i could run this script directly on cmd without creating a .bat file?