Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2001
    Location
    brisbane.qld.au
    Posts
    3

    Grin Short file names - how do you create them in SF

    I need to write a file path (gathered from a startup variable) into an INI file in the old 8.3 format.

    ie

    c:\program files\the language market\japanese\

    needs to look like

    c:\progra~1\thelan~1\japane~1\

    I've noticed else where from searches that you need to put quotes around a long file name if it contains spaces - but nothing on truncating to DOS/Win3.1 friendly format.

    Cheers
    Alistair

  2. #2
    Join Date
    Jun 2000
    Location
    Indigo Rose Software
    Posts
    1,943

    Re: Short file names - how do you create them in SF

    Hi,

    Sorry but there is no way to convert long file names into short using Setup Factory.

    Which path do you want to write into the INI file?

    mark.
    MSI Factory The Next Generation Intelligent Setup Builder

  3. #3
    Join Date
    Oct 2001
    Location
    brisbane.qld.au
    Posts
    3

    Re: Short file names - how do you create them in SF

    Originally posted by Mark:
    Hi,

    Sorry but there is no way to convert long file names into short using Setup Factory.

    Which path do you want to write into the INI file?

    mark.
    I want to write the install path into the ini file of a 3rd party double byte font interpreter we are using. The DBFI is written in 16bit code and will only recognise short file names.

    Given that SF won't truncate then I guess I'm forced to install the app in the root of C drive (or something similar).

    Alistair


  4. #4
    Join Date
    Oct 2001
    Location
    Brussels, Belgium
    Posts
    9

    Re: Short file names - how do you create them in SF

    I had the same problem. I solved it by using the relative path (".\") instead of the absolute path in the INI file.

  5. #5
    Join Date
    Jan 2000
    Posts
    2,002

    Re: Short file names - how do you create them in SF

    Although it would be a bit of work, there is a Windows API (Shell) call "GetShortPathName". You could write a small C++ program that accepts a long filename as an argument and then writes the short name out to the INI file. Othrwise, hold out for SUF60 (next week) which has a built-in function to make a long filename into a short filename.

    - Brett

  6. #6
    Join Date
    Feb 2001
    Location
    Indigo Rose Software
    Posts
    2,728

    Re: Short file names - how do you create them in SF

    You could actually do this using a batch file, using stub files and the DIR command with the /X option.

    Have a look at the Short2Long.bat file in the following batch file archive:
    http://www.ss64.demon.co.uk/ntsyntax/ss64_NT.zip

    The batch file is NT-specific, so if you only need this to work on NT you could use that file as-is. Otherwise, you'll need to add logic to the batch file to detect the OS and use the different command options available in 9x.
    --[[ Indigo Rose Software Developer ]]

  7. #7
    Join Date
    Oct 2001
    Location
    brisbane.qld.au
    Posts
    3

    Re: Short file names - how do you create them in SF

    Originally posted by dom:
    I had the same problem. I solved it by using the relative path (".\") instead of the absolute path in the INI file.
    Relative paths are no good for our project unfortunately.

    Alistair


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts