954,483 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to create set of files.

Hi
My input file is as below.

AXY,21,23,12,334,34
VBE,32,34,32,43,34
AXX,32,34,45,32,45
AXY,23,43,323,122
VBE,23,3,323,21,121

Now here the first token designate the nodal name. Now what i want is to create a set of file
name AXY_info.txt,VBE_info.txt,AXX_info.txt and here file name designating the nodal name and each file should contain their respective values. So for that i need to create an array of files depending on the number of distinct nodal points. Also i m facing problem while calling the close() for these files as i m not able to know how many files are being created in advance. How should i do this.
Kindly help

tonyaim83
Light Poster
49 posts since Aug 2007
Reputation Points: 8
Solved Threads: 0
 

With 28 posts you should know by now that you have to post code if you expect anyone to be able to answer your question.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

If the nodal name is a string type, you can simply add "_info.txt" to it to create the file name. Open and output the rest of the line. Close the file. Read the next nodal name.

WaltP
Posting Sage w/ dash of thyme
Moderator
10,505 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You