On Sun, 28 May 2017, Charlie wrote:
> I presume you just want the file name not the folder details. If so try this,
> sFiles will contain just the file name: -
> *Public Sub Form_Open()
> Dim sFileArray As New String[]
> Dim sFiles As New String[]
> Dim sTemp As String
> sFileArray = RDir(User.Home, "*", gb.File) 
> For Each sTemp In sFileArray
>   sFiles.Add(Mid(sTemp, RInStr(sTemp, "/") + 1))
> Next
> End*

Instead of Mid(sTemp, RInStr(sTemp, "/") + 1) you may want to use the
appropriately named function File.Name(sTemp).

Still, using RDir(..., "*", gb.File) only gives me files, no directories,
so I can't reproduce your original problem here.

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to