I have a batch file and I need to invoke it like this "mybatch.bat -r c:\mydir", and the batch file loops through the directory and writes file names to the output. The problem I'm facing is that I cannot read parameter "-r".
Here's what it looks like:
@echo off
echo [%date% %time%] VERBOSE START
for %%X in (%1\*.xml) do echo [%date% %time%] VERBOSE systemmsg Parsing XML file '%%X'
echo [%date% %time%] VERBOSE END
I can however use %2 instead of %1 and all works fine, but I want to read by parameter. Is this possible?
Cheers!