Results 1 to 4 of 4

Thread: Newbe question

  1. #1

    Default Newbe question

    I'm tring to copy the files from the old version to the new one.
    It's working, but as they are almost 200 files it take a little time.
    Can I make the progressbar uptading as a file is copied?
    Here is my basic script:
    If %_SB_INSTALLDIR%\PROCHEFF "File or Folder exists" Then
    Display Message Box ("Do you want to import the old data?", "Import")
    If %_SB_RETURN% Equals "6" Then
    Progress Dialog: Set Status Text #1 to "Coping files:"
    Progress Dialog: Set Progress Bar to "[Auto Update]"
    Copy File(s) from "%_SB_INSTALLDIR%\ProCheff\*.tps" to
    "%_SB_INSTALLDIR%\Exec\ProCheff" [Permanent] [RemoveReadOnly]
    Rename File/Folder "%_SB_INSTALLDIR%\ProCheff" to
    "%_SB_INSTALLDIR%\ProCheffv3"
    Progress Dialog: Set Status Text #1 to "Instaling new files:"
    End
    End

    Peter Kompier

  2. #2

    Default Re: Newbe question

    Peter,

    the Copy File(s) action does not support copying data with progress.

    I'll check if it is possible to add an option to handle it.

    Friedrich

  3. #3

    Default Re: Newbe question

    Maybe with SHFileOperation.

    Jeff Slarve
    www.jssoftware.com

    WAG, the dog?

  4. #4

    Default Re: Newbe question

    Hi Jeff,

    >
    > Maybe with SHFileOperation.
    >

    I think Peter would like to display a separate (2nd) progress bar for the
    "copy 200 files" action when using *.tps wildcards. Similar to the 2nd
    progress bar when installing a large file.

    To do this, the runtime internally has to execute the "Copy File(s)" action
    twice (for wildcards). In the first call, count the number of *.tps files
    to be processed and do not copy. Then in the second step, call the "Copy
    File(s)" action again, but this time handle the "real" copy file process
    (and update the 2nd progress bar for the 200 files).

    Unfortunately, SHFileOperation is not (fully) backward compatible with older
    Windows versions. The same is true for the CopyFileEx Windows API. So the
    only solution is to use a CopyFile Windows API wrapper.

    Friedrich

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
  •