I have came here by refereing someone to use the link
https://www.computerhope.com/forum/index.php?topic=135977.0. I know that the topic is very old but I have some issues as under:
I have two batch files named as : 1) Combine.bat 2) Picenquiry.bat
The contents of Combine.bat file are as:
@echo off
for %%A in (*.txt) do (
echo Processing file '%%A'
FOR /F "delims=" %%L in (%%A) do (
ECHO %%L%%A >> DataFile.txt
)
)
and contents of Picenquiry.bat are as:
@echo off
ren "F:\meter_pictures\??????rc*." *.txt
call "F:\meter_pictures\combine.bat"
I am using a button on form and following code is used for click on button:
strReportpath = "F:\meter_pictures\"
Shell strReportpath & "Picenquiry.bat"
Unfortunately It runs but only run Picenquiry.bat file and do not run Combine.bat file as it is called in this batch file.
But when I run Picenquiry.bat file directly without using VBA i.e. by double clicking file name, it runs and make "DataFile.txt".
What mistake I am doing? Please help me. Its urgent.