Hi,
Am trying to read log files and then combine them into one.
I can identify them, grab the names and read ONE file and there I'm stuck..how do I read the contents of log1 and then read log 2 and combine with log1 into log_file?
Using this:
let>log_line=8
run>cmd /c dir C:\Progra~1\CCP\Eve\capture\Gamelogs\ /o-d>c:\evelogfiles.txt
label>read_log_start
let>path=C:\Progra~1\CCP\Eve\capture\Gamelogs\
// get name of latest log
readln>c:\evelogfiles.txt,%log_line%,latestlog%log_line%
//readln>c:\evelogfiles.txt,9,2ndlatestlog
// Get actual file name //
let>file_name={"file_name"+%log_line%}
Midstr>latestlog%log_line%,40,19,file_name
// read the log //
let>path1=%path%%file_name%
readfile>path1,log_text
let>log_text_final=%log_text%+1
message>log_text_final
let>log_line=%log_line%+1
if>log_lineend
readfile with variable?
Moderators: JRL, Dorian (MJT support)
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
You can use Macro Scheduler Appendfile> command:
AppendFile>c:\temp\file1.txt,c:\temp\file2.txt,c:\temp\newfile.txt,result
======================
You can also use COPY command to append files:
COPY file1.txt + file2.txt + file3.txt file4.txt
This will result in file4.txt which will be files1,2,3.txt appended as one file.
This can be done in Macro Scheduler with
Run Program> cmd /c COPY file1.txt + file2.txt + file3.txt file4.txt
AppendFile>c:\temp\file1.txt,c:\temp\file2.txt,c:\temp\newfile.txt,result
======================
You can also use COPY command to append files:
COPY file1.txt + file2.txt + file3.txt file4.txt
This will result in file4.txt which will be files1,2,3.txt appended as one file.
This can be done in Macro Scheduler with
Run Program> cmd /c COPY file1.txt + file2.txt + file3.txt file4.txt
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!