File.Install Help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • shinyrory
    Forum Member
    • Sep 2006
    • 17

    File.Install Help

    Hey again

    I need some help with the File.Install command. I want to use i to put some files onto the hard drive but it does not seem to work. Here is the code i used:

    target_folder = Dialog.FolderBrowse("Please select a folder:", "C:\\");
    File.Install("testfolder\\*.*", target_folder, FILE_INSTALL_ASK, false, false, nil, nil);

    when i use the File.Copy command it works but not the File.install command... any ideas would be appreciated thank you.
  • mwreyf1
    Indigo Rose Customer
    • Aug 2004
    • 417

    #2
    What is testfolder?

    Is it a variable that has already been set before this action is ran?

    File.Install("testfolder\\*.*", target_folder, FILE_INSTALL_ASK, false, false, nil, nil);

    Comment

    • shinyrory
      Forum Member
      • Sep 2006
      • 17

      #3
      testfolder is where the files i want to be copied are. Its jsut a tempoary a folder name.

      Comment

      • mwreyf1
        Indigo Rose Customer
        • Aug 2004
        • 417

        #4
        Just tried it myself and it appears that you CAN'T use wildcards (*) with this action.

        Someone correct me if I'm wrong.

        Comment

        • shinyrory
          Forum Member
          • Sep 2006
          • 17

          #5
          So i have to use the File.Copy command if i want to use wildcards? bummer :(

          OK well can you help me with something else then? I created this code to transfer files:

          --Folder Browse Dialog
          target_folder = Dialog.FolderBrowse("Please select a folder:", "C:\\");

          -- Check to see if the CANCEL was not chosen
          if (target_folder ~= "CANCEL") then

          StatusDlg.Show(MB_ICONNONE, false);
          StatusDlg.ShowCancelButton(false, "Cancel");
          StatusDlg.SetTitle("Installing files...");
          File.Copy("FolderFiles\\*.*", target_folder, true, true, true, true, nil);
          StatusDlg.Hide();

          Dialog.Message("Notice", "All Done!", MB_OK, MB_ICONNONE, MB_DEFBUTTON1);
          end

          This part of the code does not work StatusDlg.SetTitle("Installing files..."); neither does trying to set the message of the status dialog window. Can you please tell me how to fix this? Also how do i have a percentage number alongside the progress bar? please help! thanx
          Last edited by shinyrory; 02-10-2007, 02:38 PM.

          Comment

          • shinyrory
            Forum Member
            • Sep 2006
            • 17

            #6
            bumb! help please!

            Comment

            • mz241508
              Forum Member
              • Oct 2006
              • 351

              #7
              This function works fine for me, maybe the file you want to copy from isn't correct/wrong. Use the File.Copy function and follow the steps for more accuracy.

              Comment

              Working...
              X