Count the filename and need to check all are present

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
anu
Posts: 8
Joined: 24 Aug 2009 21:18

Count the filename and need to check all are present

#1 Post by anu » 17 Sep 2009 04:19

got these 3 folders
@echo off
set "F1=c:\test\achieved"
set "F2=c:\test\error"
set "F3=c:\test\resolved"

I got a a.xml file in error folder which contains likethis
<?xml version="1.0" encoding="UTF-8"?>
<XA>
<Header>
<Total_Record_Count>2</Total_Record_Count>
</Header>
<XTable>
<XARecord>
<X_File_Name>v1.xml</XBRL_File_Name>
<XFiling_Dttm>20081120091132</XFiling_Dttm>
</XRecord>
</XTable>
<XTable>
<XARecord>
<X_File_Name>v2.xml</XBRL_File_Name>
<XFiling_Dttm>20091120091132</XFiling_Dttm>
</XRecord>
</XTable>
</XA>

i need to read the file a.xml and read the line X_File_Name .
Then check whether
v1.xml and v2.xml present in achieved folder . If exist move the file into resolved before that need to check Total_Record_Count = no of file.
then move it

Post Reply