Re: Problem Creating Files
What is it that you do that needs creation of 25,000 files ??? Nothing malicious I hope?
Re: Problem Creating Files
I think the buffer fills up, and you have to wait before you can write more files.
Re: Problem Creating Files
How can increase the buffer???
Re: Problem Creating Files
Quote:
Originally Posted by RhinoBull
What is it that you do that needs creation of 25,000 files ??? Nothing malicious I hope?
I am creating web pages.
Re: Problem Creating Files
For that many files you may have to split them into a LOT of sub folders.
Re: Problem Creating Files
Quote:
Originally Posted by Medianutz
I am creating web pages.
I saw that part ... but what are they for ???
Re: Problem Creating Files
This is .NET code, not VB6.
I know this is a long shot, but try:
Code:
oWrite = Nothing
oFile = Nothing
WOka
Re: Problem Creating Files
RhinoBull,
I am creating seo pages for marketing a few sites we designed.
Medianutz
Re: Problem Creating Files
If you are using .NET why don't you create one page using ASP.NET, that will dynamically query the database? Or is this not an option?
WOka
Re: Problem Creating Files
That would work , but static pages work better with the spiders.
Re: Problem Creating Files
Is that a good thing?
Amazon isn't static but you can still find individual items on it by searching in google...?
Am I missing something?
WOka
Re: Problem Creating Files
Inkintome does not like them on the xml feed.
Re: Problem Creating Files
This question should be in the .asp or web building forum.
I did find a webpage in google on how to make dynamic pages found using search engines.
Re: Problem Creating Files
Hi Woka,
I added:
oWrite = Nothing
oFile = Nothing
I also added a loop that counts 1->1000000 to allow time for the buffer to catch up. However I am still getting the same problem. Thank you very much for the suggestion.
Medianutz
Re: Problem Creating Files
[QUOTE=Chrispybee]This question should be in the .asp or web building forum.
QUOTE]
Chrispybee,
I am using vb to create the files which are asp. So why should this not be in the vb forum?
Medianut
Re: Problem Creating Files
Code:
Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click
No, you are using .NET to create the files.
Well, I have done:
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Index As Long
For Index = 1 To 10000
createfile("C:\Arse\File" & Index.ToString & ".htm")
Next
End Sub
Private Sub createfile(ByVal location As String)
Dim oFile As System.IO.File
Dim oWrite As System.IO.StreamWriter
oWrite = oFile.CreateText(location)
oWrite.WriteLine("<html><head>")
oWrite.WriteLine("<title>" & location & "</title>")
oWrite.WriteLine("<meta name='keywords' content='Woof'>")
oWrite.WriteLine("<meta name='description' content='moose'>")
oWrite.WriteLine("</head><body>")
oWrite.WriteLine("<table border=1>")
oWrite.WriteLine("<tr>")
oWrite.WriteLine("<td>")
oWrite.WriteLine("</td>")
oWrite.WriteLine("<td>")
oWrite.WriteLine("</td>")
oWrite.WriteLine("</table>")
oWrite.WriteLine("</body></html>")
oWrite.Close()
oWrite = Nothing
oFile = Nothing
End Sub
And it's just created 10,000 files on my PC. It seemed to do that perfectly.
Woka
Re: Problem Creating Files
Woka,
I will try this when I get home.
Thank you for all your help.
Medianutz
Re: Problem Creating Files
It's exactly the same code as you had :D But it worked for me.
Woka