Output data in certian format

Microsoft Windows xp professional editio...
November 23, 2009 at 18:26:25
Specs: Windows XP
Ok for this problem I don't have many ideas on how to go about it.

I have a file of 300 UserId (userids.txt) in the following format


I want to take these names and create a new file but in a certain format

The basic template of the new file looks like this
where UserId needs to be populated from the userids.txt file


The following is an example of what it would look like.


Any ideas on how best to do this ?

See More: Output data in certian format

Report •

November 23, 2009 at 20:57:11
not tested... try:

del userids.out 2>nul
for /f %%a in (userids.txt) do (
echo ^<User^> >> userids.out
echo ^<userid^>%%a^<^/userid^> >> userids.out
echo ^<NotifFolder^>c:\temp\^<^/NotifFolder^> >> userids.out
echo ^<^/User^> >> userids.out)

prob'ly some errors, lots of escapes req'd: all gt and lt and
fwd slashes must be escaped unless you assign those char.s
to variables and use those instead.
as you can see, userids.out is rebuilt from scratch on each run.

Report •

November 24, 2009 at 16:42:39
Nice concept :-) its ok I will give it a test run and see if I can fix the XML escaping if any.

I think I could not get my head around how to do this so now that you have shown me the idea I have some thing to get my teeth in to.

Report •

Related Solutions

Ask Question