Results 1 to 5 of 5

Thread: Create Folder part deaux

  1. #1

    Default Create Folder part deaux

    Friedrich,

    If use Create Folder function for the case where a user enters a new folder
    that does not exist how does this function work? For example, none of the
    following folders exists (except the drive):

    M:\ProgramData\RFI\CoolApp\Data

    Is there an issue with creating this? Assume that %DATADIR% is set to the
    above folder, then what happens with the following code:

    Create Folder "%DATADIR%"
    If %_SB_ERRORCODE% Equals "0" Then
    Display Message Box "The install was not able to create the data
    folder..." -- "Creating the data folder failed"
    End

    Will the entire folder structure above be created? Or do I need to do
    something else?
    --
    Russell B. Eggen
    www.radfusion.com
    Clarion developers: www.radfusion.com/dev.htm

  2. #2

    Default Re: Create Folder part deaux

    Russ,

    > Will the entire folder structure above be created? Or do I need to do
    > something else?

    Yes, this is the correct way to handle this.

    Note: %_SB_ERRORCODE% will return "0" (failed) if the folder already exists!
    To handle this scenario, use:

    If %DATADIR% File or Folder doesn't exist Then
    Create Folder "%DATADIR%"
    If %_SB_ERRORCODE% Equals "0" Then
    Display Message Box "Creating the data folder failed yada"
    End
    End

    Friedrich

    --
    Friedrich Linder
    Lindersoft
    www.lindersoft.com
    +1.954.252.3910

    SetupBuilder is installation -- "point. click. ship"

    -- Official Comodo Code Signing and SSL Certificate Partner

  3. #3

    Default Re: Create Folder part deaux

    Thank you! Worked a treat. ;-)

    --
    Russell B. Eggen
    www.radfusion.com
    Clarion developers: www.radfusion.com/dev.htm

  4. #4

    Default Re: Create Folder part deaux

    >
    > Thank you! Worked a treat. ;-)
    >

    Cool :-)

    Friedrich

  5. #5

    Default Re: Create Folder part deaux

    I like the simple solutions <G>

    --
    Russell B. Eggen
    www.radfusion.com
    Clarion developers: www.radfusion.com/dev.htm

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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