Announcement

Collapse
No announcement yet.

Copy folder to AppData \ Roaming universally

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

  • JUNINHO
    replied
    Thank you very much my savior!

    Leave a comment:


  • colc
    replied
    Here is a sample script:

    Code:
    -- retrieve the default application data folder
    local sApplicationDataFolder = Shell.GetFolder(SHF_APPLICATIONDATA);
    -- set default target folder
    local sMyDataFolder = sApplicationDataFolder .. "\\MyApplicationName";
    
    -- if needed, create the target folder for the application
    if (not Folder.DoesExist(sMyDataFolder)) then
    Folder.Create(sMyDataFolder);
    error = Application.GetLastError();
    if (error ~= 0) then
    Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
    -- can't copy files if folder could not be created
    Application.ExitScript();
    end
    end
    
    -- copy all files in the "MyFiles" folder of the AutoPlay application
    StatusDlg.Show();
    File.Copy("AutoPlay\\MyFiles\\*.*", sMyDataFolder, true, true, false, false)
    StatusDlg.Hide();

    Leave a comment:


  • JUNINHO
    replied
    I want to copy a folder to AppData \ Roaming

    Leave a comment:


  • JUNINHO
    replied
    Can you give me an example?

    Leave a comment:


  • Sina Dehghani
    replied
    Hi, for this you can use the:
    Shell Get Folder

    Leave a comment:


  • JUNINHO
    started a topic Copy folder to AppData \ Roaming universally

    Copy folder to AppData \ Roaming universally

    I would like to know how I do to copy a folder to AppData \ Roaming in a universal way so that it runs on any pc.

    Sorry for my lack of knowledge!
Working...
X