Hi,
In Windows, in cDir, there is a file with name "Something.PDF" (note .PDF)
cFile = "Something.pdf"
lFound = file.Exists(cDir, cFile) ' True
In ABMaterial, in ABMPdfViewer do not open cFile because real name in disk is "Something.PDF".
How to know real name in disk ?
My workaround is poor, because is can be slow.
In Windows, in cDir, there is a file with name "Something.PDF" (note .PDF)
cFile = "Something.pdf"
lFound = file.Exists(cDir, cFile) ' True
In ABMaterial, in ABMPdfViewer do not open cFile because real name in disk is "Something.PDF".
How to know real name in disk ?
My workaround is poor, because is can be slow.
B4X:
' Return Real name file in disk
Dim cFileTmp As String
Dim listFiles As List = File.ListFiles(cDirFull)
Dim nI As Int
Dim cTmp1 As String
Dim cTmp2 As String
cFileTmp = cFile
cFileTmp = cFileTmp.ToUpperCase
For nI= 0 To listFiles.Size- 1
cTmp1 = listFiles.Get(nI)
cTmp2 = cTmp1
cTmp2 = cTmp2.ToUpperCase
If cTmp2 == cFileTmp Then
' Encontrado: coge el nombre del file en disco y sale.
cFile = cTmp1
'Log("encontrado !! " & cFile & "///" & cTmp1 & "///" & cTmp2 & "///"& cFileTmp)
Exit
End If
Next
'Log("aqui viendo " & lExist & "///" & File.GetName(cFileFullFull) & " " & File.Size(cDirFull, cFile) & "///"& cFile )