A command line runs fine in Command Prompt console but doesn't run at all from a batch file (*.bat)?
-
I have several generated log files in a folder (TestLogs). I was able to do execute the following command line to put them together in a single file: for %f in (.\TestLogs\*.html) do type "%f" >> AggregatedTestLogs.html However, putting this in a batch file, it doesn't work at all. I don't even get an error message when I tried to pause the execution right after the command.
-
Answer:
in batch files, you have to use double %'s. like so: for %%f in (.\TestLogs\*.html) do type "%%f" >> AggregatedTestLogs.html
Mr. Kholban at Yahoo! Answers Visit the source
Related Q & A:
- How to run an interactive batch file on windows from a service?Best solution by Stack Overflow
- Is it true that a permanent resident of the US doesn't need a visa for a short stay in Switzerland?Best solution by Yahoo! Answers
- Why doesn't a Nissan truck run smooth in overdrive?Best solution by Yahoo! Answers
- How to make a batch file copy itself?Best solution by Yahoo! Answers
- Why doesn't audio system work on a low volume?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.