Old 06-22-2018, 06:04 PM   #1
lollo
Human being with feelings
 
Join Date: Jun 2017
Posts: 54
Default reaper.ExecProcess vs .bat

Hi everybody,

I looking for a way to execute this API with a multiline commands.
It's easy do it writing a file *.bat, for example:

Code:
REN file1.wav file2.wav
REN file2.wav file3.wav
I found on internet a way to concatenate more line commands. I saw that the solution could be to use the && syntax to separate them, others say you need to use & as separator.
I tried and it doens't works using reaper.ExecProcess API.

Of course my example is very stupid and it haven't sense.
My scope is to have all in a unique line, because my needs is to wait that the first command is finished before to execute the second one, so in my case, I can not use more than one reaper.ExecProcess.

Any suggestion?
lollo is offline   Reply With Quote
Old 06-22-2018, 06:07 PM   #2
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,970
Default

Executing an external program is not necessary for renaming files. Lua has a built-in function for that: os.rename.
cfillion is offline   Reply With Quote
Old 06-22-2018, 06:20 PM   #3
lollo
Human being with feelings
 
Join Date: Jun 2017
Posts: 54
Default

Yes, I specified well that renaming was not my purpose.
I need use it for rendering and only after it is finished to have the possibility to execute the next one (like a promise)
lollo is offline   Reply With Quote
Old 06-23-2018, 12:35 AM   #4
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,902
Default

Quote:
I tried and it doens't works using reaper.ExecProcess API.
The problem isn't from ExecProcess, but from your code !


My current BWFscripts just do that (put all different cmds on the a single line).



" & " for windows, "; " for mac.


I think there is other separators to tell "only if success", like " && " for windows, but untested.
X-Raym is offline   Reply With Quote
Old 06-23-2018, 02:46 AM   #5
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,630
Default

Could you post one example for your ExecProcess-call and how you write the bat-file?
Meo-Ada Mespotine is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:03 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.