I am trying to run a command line, after a command line. The purpose is to go into the correct directory and then create a folder there.
I have looked at the node.js api, although the code looks complicated and it doesnt directly show how to run multiple command line arguments.
const { exec } = require('child_process');
exec(['cd desktop', 'mkdir Folder'], (err) => {
if (err) {
console.log(err);
}
});
I am hoping to go into the "desktop" directory, and then create a folder there. The whole purpose is to run the following two commands in series.
cd desktop
mkdir Folder