Re: [Gambas-user] Strange behaviour of File.Read

2017-06-22 Thread bill-lancaster via Gambas-user
The directory string was written from a directory chooser, originally via a string variable - this is where the quotes came from. Using a variant produces a string without quotes and presumably without \n Thanks again -- View this message in context:

Re: [Gambas-user] Strange behaviour of File.Read

2017-06-21 Thread Jussi Lahtinen
Perhaps more clear this way, maybe your file contains line: "/home/bill/Pictures/Family/Visits/2000-07-29" instead of /home/bill/Pictures/Family/Visits/2000-07-29 . So, the quote marks shouldn't be there... Jussi On Wed, Jun 21, 2017 at 10:47 PM, Jussi Lahtinen wrote:

Re: [Gambas-user] Strange behaviour of File.Read

2017-06-21 Thread Jussi Lahtinen
Is that the literal output? Because if there really are quote marks, then the command is equal to: Print IsDir("\"/home/bill/Pictures/Family/Visits/2000-07-29\"") Which is clearly false. However if it is not literal output, then it is impossible to say what is read from the file to the

Re: [Gambas-user] Strange behaviour of File.Read

2017-06-21 Thread bill-lancaster via Gambas-user
Thanks so much for the insight. IsDir(Trim(s)) still produced False, but I tried saving the path with a Variant instead of a string and now I get True Thanks again -- View this message in context: http://gambas.8142.n7.nabble.com/Strange-behaviour-of-File-Read-tp59467p59481.html Sent from

Re: [Gambas-user] Strange behaviour of File.Read

2017-06-21 Thread Charlie
bill-lancaster wrote > I must be missing something - any ideas Try changing the line *Print IsDir(s) * to *Print IsDir(Trim(s)) * It worked for me. - Check out www.gambas.one -- View this message in context:

[Gambas-user] Strange behaviour of File.Read

2017-06-21 Thread bill-lancaster via Gambas-user
I must be missing something - any ideas? Gambas3.9.2 Components, gb.form, gb,gui, gb.image This is the code:- Public Sub Button1_Click() Dim s As String s = File.Load(User.Home &/ "Pictures/PhotoFolder.txt") Print s Print IsDir(s) Print