How to prevent opening console window whilst running a batch

I've made a small C# program that converts a code page on a text file (CodeToUTF8.exe). The idea was to batch run the files against that program in Opus. It of course opens a console window in case you'd like to run it separately.

Is it somehow possible to instruct Opus to obscure the console window or should I modify my program to include this option? The thing is - it of course opens a new console window each time it runs, so it's kinda flashy. :slight_smile:

The button code looks like this:

@nodeselect 
Copy DUPLICATE {filepath} AS="{file|noext}.W1250" HERE
/dopusdata\UserCommands\CodeToUTF8.exe "{filepath}" "{filepath}" Windows-1250

Add a line with @runmode:hide

Reference:

1 Like

Exactly what I was looking for, works like a charm - thanks. :slight_smile:

@nodeselect 
Copy DUPLICATE {filepath} AS="{file|noext}.W1250" HERE
@runmode:hide /dopusdata\UserCommands\CodeToUTF8.exe "{filepath}" "{filepath}"

It should be on its own line:

@nodeselect 
@runmode:hide
Copy DUPLICATE {filepath} AS="{file|noext}.W1250" HERE
/dopusdata\UserCommands\CodeToUTF8.exe "{filepath}" "{filepath}"

By the way, your exe should be in the User Data folder if you want it to be included in config backups (you can put anything in/below that folder). The UserCommands folder is for things made under Customize > User Commands.

1 Like

Thanks for the tip @Leo. To be frank, I'm always confused by all those folders under (/dopusdata/) "%appdata%/GPSoftware/Directory Opus". Is everything else backed up from there, too? Like custom images and icons etc.?

BTW, is it "UserData" or "User Data" folder?, it seems to me my installation put "User Data"...

User Data is correct. I've edited my post above to fix that.

There's a FAQ which goes into detail about which config folders are backed up and what they do, if you need to know that. But generally, if you made the file directly (rather than Opus making it) then it should go under User Data.

1 Like