Announcement

Collapse
No announcement yet.

File.GetShortName error disk D?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • File.GetShortName error disk D?

    Hello everyone, it has been a long time since the last visit to the forum ..

    It turns out that now I have a problem with (File.GetShortName) when I try to get the path from a disk with letter D, it doesn't work!

    Does this happen to anyone else? any solution that you can recommend!

    Best regards to all and thank you very much for your responses.


    Hola a todos, paso mucho tiempo desde la ultima visita al foro..

    resulta que ahora tengo un problema con (File.GetShortName) cuando intento obtener la ruta desde un disco con letra D, no funciona!

    A alguien mas le pasa esto? alguna solucion que puedean recomendarme!

    Saludos cordiales a todos y muchas gracias por su respuestas.

  • #2
    kadel ,
    I've done some tests and short name does not work if the path is not a fixed HDD , worked on all my fixed drives [ C:\ , F:\ , G:\ , H:\ , Q:\ P:\ ] - network drives [X:\ , Y:\] also worked on [ J:\ ] which is a virtual mounted ISO cdrom??

    Did not work on DVD-RW [ D:\ ] or USB 128Gb [ I:\ ] returned full path name

    Here is the code I used as if the file does not exist nothing is returned at all
    Code:
    sFile = "J:\\ssAppsInstalls\\SetupS.SendTo.Suite_v17.12.3. 0_ssApp\\Install.SetupS_v17.12.3.0.exe"--Enter file path here
    
    result = File.DoesExist(sFile);
    if result then
    short_version = File.GetShortName (sFile);
    Dialog.Message("Notice", short_version, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
    
    else
    Dialog.Message("Notice", "File does not exist", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
    end

    Comment

    Working...
    X