I think you left out the FORWARD SLASH
Sep 13 2011
02:25 Hours
Hi
The code appears to work for me. Give it a shot!
Ray Tesluk
Sub ButtonWrite_Click
Dim TW As TextWriter
Dim xsize As String: xsize = "6"
Dim sdcard_folder As String: sdcard_folder = "testfolder"
If File.IsDirectory(File.DirRootExternal,sdcard_folder) = True Then
Try
TW.Initialize(File.OpenOutput(File.DirRootExternal & "/" & sdcard_folder,"xsize.txt",False))
TW.Write(xsize)
TW.Close
Msgbox(xsize,"xsize Value Written")
Catch
Msgbox(LastException,"Write Error")
End Try
Else
Try
File.MakeDir(File.DirRootExternal,sdcard_folder)
Msgbox(sdcard_folder & " Created",File.DirRootExternal)
Catch
Msgbox(LastException,"Create Error")
End Try
End If
End Sub
Sub ButtonRead_Click
Dim TR As TextReader
Dim xsize As String: xsize = "6"
Dim sdcard_folder As String: sdcard_folder = "testfolder"
Try
TR.Initialize(File.OpenInput(File.DirRootExternal, sdcard_folder & "/" & "xsize.txt"))
xsize = TR.ReadLine
TR.Close
Catch
Msgbox(LastException,"Read Error")
End Try
Try
If IsNumber(xsize) = False Then 'DIDN'T READ THE VALUE
Msgbox(xsize,"Not A Number")
Else
Msgbox(xsize,"IS A Number")
End If
Catch
Msgbox(LastException,"IsNumber Error")
End Try
End Sub