Hello stevel05
As I said Jack the Ripper: "go by parts"
Not quite true that putting "sdcard" is putting the wrong direction. Because when I put:
Log (File.Exists ("sdcard", "LivetoRide.jpg")) returns true
Put "sdcard" because it is the value that returned my FilePath using a FileDialog, and for example not want to create an entire call FileDialog, as I have in the program.
I used your example and erased :sign0098:
I put a log, and I returned the FileDialog same name by putting it in my string "sdcard".
To check if my program directory "sdcard" was the same as File.DirRootExternal, put a log and the names were the same.
The good thing was, I tried deleting and cleared well. And without putting the code:
File.Copy (File.DirAssets "logo.bak" File.DirRootExternal "logo.png")
So the conclusion is that by making a reference to "File.DirRootExternal", the program deletes, but if I comment this log, do not delete.
This is the code where I select a folder to see the file, and simply putting the end of the log, the program deletes.
Not much chance that before you know it going to do a File.Copy as directory "File.DirRootExternal" I also worked the program?
Now someone will have to think that if I put a log referencing "File.DirRootExternal" works.
Now, as I pass FileDialog (FilePath) directory "/mnt" to go to the root, there is a system variable to do the same?
Thanks for everything, and forgive my bad English
Jesus
Sub BuscarDirectorio
Dim id As Int
Dim P As String
Dim OldDirectorio As String
Dim lf As List
OldDirectorio = Directorio
fd.FastScroll = True
fd.FilePath = Directorio
fd.FileFilter = ".jpg,.gif,.png"
'fd.ShowOnlyFolders = True
fd.Show ("Seleccione carpeta", "Aceptar","Cancelar","",I_BGS.Bitmap)
id = fd.Response
If id = -1 Then
P= fd.FilePath
lf = File.ListFiles(P)
If lf.IsInitialized = False Then
Msgbox("No se puede acceder a la carpeta","")
Return
End If
If OldDirectorio = P Then
Return
End If
Directorio = P
Log("File.DirRootExternal-" & File.DirRootExternal & "-") ' If I remove this line does not work
End If
End Sub