Click here to Skip to main content
15,884,353 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi all,

i have scenario like below mentioned.


i want to generate 1000 multiple files in a directory.
after generating, for each generated file i have to write data of 20 pdf files into that file individually.
example
in a columns we have 1001 rows,we read from row and create/generate as files and we write the data asssociating to that row(20 pdf files)


how to generate the multiple files using File or iostream/ostream?
Posted
Comments
[no name] 17-Jul-12 11:57am    
ofstream out("c:\\file_for_really_bad_idea.txt"); will create an empty file. Just repeat 1000 times with the filenames that you want.
Albert Holguin 17-Jul-12 16:23pm    
I love your file title! +5! :D
[no name] 17-Jul-12 16:54pm    
Thanks... sometimes the stars align just right... :-)
Albert Holguin 17-Jul-12 16:57pm    
I didn't notice it at first but when I looked a second time I couldn't stop laughing... People probably think I'm crazy at work...
Sergey Alexandrovich Kryukov 17-Jul-12 12:27pm    
Why all that weird activity. If you want so create so many files with PDF content, is suggests you are doing something wrong. If you want to be taken seriously, explain your ultimate goals. Who would want to waste time for advice if the whole idea could be wrong?
--SA

1 solution

I gave you links to the file handling routines in my answer to your earlier question[^], but you still have not explained which part of this you do not understand.
Generating multiple files is merely a matter of creating loops, and repeating a sequence of create, read/write, close operations.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900