HISE Logo Forum
    • Categories
    • Register
    • Login

    OS Commands

    Scheduled Pinned Locked Moved General Questions
    13 Posts 3 Posters 362 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • d.healeyD
      d.healey
      last edited by

      There is a File.copy command already - unless Christoph hasn't merged my pull request yet

      Free HISE Bootcamp Full Course for beginners.
      YouTube Channel - Public HISE tutorials
      My Patreon - HISE tutorials

      LindonL 1 Reply Last reply Reply Quote 0
      • LindonL
        Lindon @d.healey
        last edited by Lindon

        @d-healey syntax?

        tried

        myFile.copy(myDestinationString)

        LoopPlayers.js (83): function not found :-(

        HISE Development for hire.
        www.channelrobot.com

        LindonL 1 Reply Last reply Reply Quote 0
        • LindonL
          Lindon @Lindon
          last edited by Lindon

          @d-healey -- when did you make the pull request - last I can see from you was the tablelaf stuff on June 14

          Hang on found it Aug 14.... dont think its been merged...

          https://github.com/christophhart/HISE/pull/352

          @Christoph-Hart any chance??

          HISE Development for hire.
          www.channelrobot.com

          Matt_SFM 2 Replies Last reply Reply Quote 1
          • Matt_SFM
            Matt_SF @Lindon
            last edited by

            @Lindon I think I've already used that function... I'll take a look when I'm back home

            Develop branch
            Win10 & VS17 / Ventura & Xcode 14. 3

            1 Reply Last reply Reply Quote 0
            • Matt_SFM
              Matt_SF @Lindon
              last edited by Matt_SF

              @Lindon Ah, the only one I used was startAsProcess. (no copy)

              const appData = FileSystem.getFolder(FileSystem.AppData);
              const manual = appData.getChildFile("MyProduct.pdf");
              
              inline function onbtnManualControl(component, value)
              {
                  if (value)
                      manual.startAsProcess("");
              };
              
              Content.getComponent("btnManual").setControlCallback(onbtnManualControl);
              

              My mistake...

              Develop branch
              Win10 & VS17 / Ventura & Xcode 14. 3

              1 Reply Last reply Reply Quote 0
              • d.healeyD
                d.healey @Lindon
                last edited by d.healey

                @Lindon To follow up on your commandPrompt thing.

                When you use the copy command in the terminal you're actually running a program called copy (on MacOS and Linux it's cp).

                So instead of getting a file object that references the command prompt program you'd want to get a reference to the copy program.

                Free HISE Bootcamp Full Course for beginners.
                YouTube Channel - Public HISE tutorials
                My Patreon - HISE tutorials

                LindonL 1 Reply Last reply Reply Quote 0
                • LindonL
                  Lindon @d.healey
                  last edited by

                  @d-healey said in OS Commands:

                  @Lindon To follow up on your commandPrompt thing.

                  When you use the copy command in the terminal you're actually running a program called copy (on MacOS and Linux it's cp).

                  So instead of getting a file object that references the command prompt program you'd want to get a reference to the copy program.

                  yes I get that - its just finding "copy.exe" on windows...😊

                  HISE Development for hire.
                  www.channelrobot.com

                  LindonL 1 Reply Last reply Reply Quote 0
                  • LindonL
                    Lindon @Lindon
                    last edited by

                    @Lindon ok found --- but not good news....

                    xcopy = FileSystem.fromAbsolutePath("C:\Windows\System32\xcopy.exe");
                    Console.print("Is file:" + xcopy.isFile());
                    

                    Tells me this is not a real file as far as HISE is concerned

                    HISE Development for hire.
                    www.channelrobot.com

                    d.healeyD 1 Reply Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @Lindon
                      last edited by

                      @Lindon Maybe it's a permission thing. Just use my fork, or merge that pull request into your own fork.

                      Free HISE Bootcamp Full Course for beginners.
                      YouTube Channel - Public HISE tutorials
                      My Patreon - HISE tutorials

                      LindonL 1 Reply Last reply Reply Quote 0
                      • LindonL
                        Lindon @d.healey
                        last edited by

                        @d-healey --yeah thats what im thinking I will have to do when I get to that part of the process... unless @Christoph-Hart has done the pull by then...

                        HISE Development for hire.
                        www.channelrobot.com

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        32

                        Online

                        2.0k

                        Users

                        12.8k

                        Topics

                        110.7k

                        Posts