Skip to main content
bagonterman
Inspiring
Jun 24, 2014 5:25 PM UTC
Answered

trouble with command line pc

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 is closed to new replies. Start a new post to keep the conversation going.
bagonterman
bagontermanCorrect answer
Inspiring
Jun 30, 2014 1:04 PM UTC

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
Jun 30, 2014 1:04 PM UTC

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.

Translate