IOException (FAT limitation?)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm getting an IOException whenever i try creating a file on a Storage Card
in a directory where i have at least 999 files there and all the files in
that directory have filenames that start with the same 9 characters.

As long as i have less than 999 files in that directory, or i change the
first 9 characters in the filename that i want to create, i do not get an
IOException. The Storage Card is 512 Megs and is not even close to full. If i
alter the filename of the file i'm trying to create, there is no more
exception. In the code below, if i take out the "US-92408-" or change it then
there is no exception. If i leave it how it is, i get an IOException. I'm
guessing this is because all 999 files in that directory have fiilenames that
all start with "US-92408-". So i guess i'm not allowed to create more than
999 files in a directory that begin with the same 9 characters? Is this true
of the FAT file system? If so, is there somewhere that explains the limits of
the FAT file system? because i cannot find any info on this on the web.


Public Sub makeOutputFile(TimeString as String)

Dim fileName As String = "US-92408-" + TimeString

Dim f As StreamWriter
f = File.CreateText("\Storage Card\home\" + fileName + ".txt")
'IOException
f.WriteLine("Output")
f.Close()

End Sub
 
If it's anything like something I had when I was working with VB6 ages
back, there's a limit on the number of files that can appear in the root
directory of a 'drive', rather than the filename construction.

Try writing your files to a subdirectory instead.

Hope this is in some way helpfull.


Paul
 
Ooops.. I mis read your post... my bad.

Probably doesn't help at all! :)


Paul
 
Back
Top