MoI discussion forum
MoI discussion forum

Full Version: Get list of subfolders

Show messages: All  1-3  4-7

From: vector illustrator (QUARITEXA)
8 Jan 2020   [#4] In reply to [#3]
I tried
code:
var cd = moi.filesystem.getCommandsDir(); 
moi.filesystem.shellExecute('cmd.exe', '/c dir /a:d /b /o:n "' + cd + '" > "' + cd + 'dir.tmp"');

But it displays the shell window. How to suppress it?
From: Phiro
8 Jan 2020   [#5] In reply to [#4]
In your command line the /q option is missing
Perhaps is it the problem
The /c option is use to close the Window but /q avoids the echo
From: Michael Gibson
8 Jan 2020   [#6] In reply to [#4]
Hi Quaritexa,

re:
> But it displays the shell window. How to suppress it?

A couple of possibilities here:
https://superuser.com/questions/191149/how-to-execute-cmd-exe-silently

Maybe this one:
http://www.joeware.net/freetools/tools/quiet/

- Michael
From: vector illustrator (QUARITEXA)
9 Jan 2020   [#7] In reply to [#6]
Thank you, Michael.

I chose this one:
code:
var pd = moi.filesystem.getProcessDir();
var cd = moi.filesystem.getCommandsDir(); 
moi.filesystem.shellExecute(pd + 'nircmd', 'exec hide cmd.exe /c dir /a:d /b /o:n '+ cd + '> '+ cd + 'dir.tmp');

Show messages: All  1-3  4-7