1 Reply Latest reply: Jun 30, 2014 6:04 AM by Gonterman1201 RSS

    trouble with command line pc

    Gonterman1201 Community Member

      on the mac side I have command line working. But on the pc side I can not figure this out.

      on mac it is this

      deleteF="rm -r "+myNumPhoto.slice(0,39)+"imaging/*";
            app.system(deleteF);
      

       

      on the PC i am trying to do the same thing with this.

      deleteF="RD /S \\TEST\test"

      it runs the command but I get system cannot fine file specified.

      if I run the slashes the other way it doesn't work at all any suggestions would be greatly appreciated.

        • 1. Re: trouble with command line pc
          Gonterman1201 Community Member

          alot of the problem was with all of the backward slashes. They need return characters. That said I ended up making a string. Here is what I used.

              myNumPhoto=app.document.presentationPath;
              s=myNumPhoto.slice(0,42)
              s.toString();
              s=s+"imaging";
                deleteF="RD /S /Q "+s;
                addF="MD "+s;
                app.system(deleteF);
                app.system(addF);
          

          I had to delete the folder then add it back in on the PC because the RD command does not except wildcard characters.