For the record, the corrected script looks like this:
setlocal ENABLEDELAYEDEXPANSION
for %%f in (%MYTARGETDIR%\*config.xml) do (
SET TMPFILE=%%F.tmp
echo In loop !TMPFILE!
)
echo End loop %TMPFILE%
Thanks chris for your help.
More Related Contents:
- How can you find and replace text in a file using the Windows command-line environment?
- How do I run two commands in one line in Windows CMD?
- How to check if a process is running via a batch script
- How to echo with different colors in the Windows command line [closed]
- Parallel execution of shell processes
- How to run a PowerShell script without displaying a window?
- Escape percent in bat file
- Windows batch file file download from a URL
- How to run batch file from network share without “UNC path are not supported” message?
- How to ftp with a batch file?
- How to split a string by spaces in a Windows batch file?
- How can two text files be read in parallel by a batch file?
- Batch files: List all files in a directory with relative paths
- Read stdin stream in a batch file
- Setting a windows batch file variable to the day of the week
- “rd” exits with errorlevel set to 0 on error when deletion fails, etc
- Curl not recognized as an internal or external command, operable program or batch file
- What is the easiest way to reset ERRORLEVEL to zero?
- Why %processor_architecture% always returns x86 instead of AMD64
- Remove unwanted path name from %path% variable via batch
- Why is the FOR /f loop in this batch script evaluating a blank line?
- How to check if a directory exists in %PATH%
- How do I make a log of all ECHO commands in a BATCH file?
- How do I minimize the command prompt from my bat file
- batch file Copy files with certain extensions from multiple directories into one directory
- Path prefixes \??\ and \\?\
- Windows console %DATE% Math
- Using echo y as an automated response to a pcp hostkey prompt
- Difference between %variable% and !variable! in batch file
- Batch file to upload .txt to FTP