I have this string that I use to read a directory of files and then process them according to the second part of the string.
Works fine when i directly enter it into a CMD window, but when writing it into a .bat file, the CMD flashes and goes away without processing the files. The directory may contain up to 4000 files and what I am trying to do is loop through each file in the directory and insert the data into a Database. And as I said, works fine when I manually paste it into a CMD window, but when running from .bat file, doesn't work.
Here is the string.. any suggestions?
for /f %A IN ('dir /b C:\scripts\files\work\out\*.txt') do call load AR01 -file "C:\scripts\files\work\out\%A" -add