volvomann Active Member Licensed User Longtime User May 12, 2012 #1 I use filedialog to save and open file, B4X: File.WriteMap(File.DirRootExternal & "/pulsdata", lagre , Map1) Hov can i add .txt to all files when saving? I tried top putt & .txt after the filestring, that works but when i save the same file next time it got .txt.txt So how can i fix that. Tried to set filter to .txt but that oly works with open file. Last edited: May 12, 2012
I use filedialog to save and open file, B4X: File.WriteMap(File.DirRootExternal & "/pulsdata", lagre , Map1) Hov can i add .txt to all files when saving? I tried top putt & .txt after the filestring, that works but when i save the same file next time it got .txt.txt So how can i fix that. Tried to set filter to .txt but that oly works with open file.
Erel B4X founder Staff member Licensed User Longtime User May 12, 2012 #2 B4X: Dim filename As String filename = ... If filename.EndsWith(".txt") = false Then filename = filename & ".txt" Upvote 0
B4X: Dim filename As String filename = ... If filename.EndsWith(".txt") = false Then filename = filename & ".txt"
volvomann Active Member Licensed User Longtime User May 12, 2012 #3 Erel said: B4X: Dim filename As String filename = ... If filename.EndsWith(".txt") = false Then filename = filename & ".txt" Click to expand... Thanl you Upvote 0
Erel said: B4X: Dim filename As String filename = ... If filename.EndsWith(".txt") = false Then filename = filename & ".txt" Click to expand... Thanl you