Skip to main content
bagonterman
Inspiring
June 24, 2014
Answered

trouble with command line pc

  • June 24, 2014
  • 1 reply
  • 372 views

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.

This topic has been closed for replies.
Correct answer bagonterman

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.

1 reply

bagonterman
bagontermanAuthorCorrect answer
Inspiring
June 30, 2014

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.