Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

execCommand() is not working in workflow.

parveshp7822672
Level 3
Level 3

Hello Everyone,

execCommand() is not working in a JS activity in a workflow on application server.

There is on-premise instance and build is 9032.

Configuration is serverConfig.xml:

<!-- Command execution

         blacklistFile :  Path to the file containing the commands to blacklist

         user :  Execute commands as a different user -->

    <exec blacklistFile="" user=""/>

JS Code:

logInfo(execCommand("cd",true));

Error:

BAS-010076 Cannot execute command 'cd' (err=2, the system cannot find the file specified.).

I am getting same error for every commands.

Please let me know if you have any question.

Thanks.

Parvesh.

1 Accepted Solution
saikatk2447661
Correct answer by
Level 4
Level 4

If this is windows server try logInfo(execCommand("cmd /c cd",true));

View solution in original post

0 Replies
saikatk2447661
Correct answer by
Level 4
Level 4

If this is windows server try logInfo(execCommand("cmd /c cd",true));

View solution in original post

rajAdobeDev
Level 2
Level 2
Hi, I have windows location as D:/Adobe/Adobe Campaign v6/var/ALGN/workflow under that i have directories starts with "wf-algn__" and again inside, one more directory is there "Workflow". Finally i have files with .TXT and .CSV , I want to remove all those files. need some suggestion on how to achieve that. Regards, Rajshekar.
parveshp7822672
Level 3
Level 3

Hello Saikatk,

Thanks it is working now.

Could you please explain me why the first one was not working?

This solution is not mentioned in documentation.

How did you find it?

Thank.

Parvesh.

saikatk2447661
Level 4
Level 4

1. No idea.

2. Adhiyan​​ told me few months back.

wodnicki
Community Advisor
Community Advisor

Hi,

'cd' is not a Windows executable, it's a cmd command.

Thanks,

-Jon

parveshp7822672
Level 3
Level 3

Hello Jon,

Yes, 'cd' is a cmd command.

Can you please explain, what do you mean by Windows executable?

Thanks.

Parvesh.