[Gambas-user] Array 2 String or different approach on what im trying to do.
lozza1978
piresl at ...626...
Tue Jan 8 19:43:09 CET 2008
Hi All.
Im after a little help again (Sorry for lack of knowledge guys)
I have a textbox and a browse button, you click browse, select a file and
the file path, including filename gets added inside the textbox.
what im after is the directory of the file selected, so this is what I have
DIM Elt AS String[]
DIM Sb AS String
DIM Sdir AS String
DIM sstri AS String[]
Dialog.Title = "Select A Movie File to convert 2 DVD:"
IF Dialog.OpenFile() THEN RETURN
Textbox1.Text = Dialog.Path
Elt = Split(Textbox1.Text, "/") <--Split the path
Sdir = Elt.Length - 1 <--here Im finding out how many elements in the array
Elt.Remove(Elt.Length - 1) <-- here removing the filename, so that I have
the directory where the file is located
FOR EACH Sb IN Elt
PRINT sb; "/";
NEXT
PRINT
END
the code above works and the foreach prints the correct directory path, But
i some how need to get the output of the foreach into a string so I can call
the directory path using a string/variable
im just confusing myself now, hope someone can understand what im trying to
do and help me, thanks again for reading.
--
View this message in context: http://www.nabble.com/Array-2-String-or-different-approach-on-what-im-trying-to-do.-tp14695884p14695884.html
Sent from the gambas-user mailing list archive at Nabble.com.
More information about the User
mailing list