Thank you!!!!
I set up a dummy session and now everything seems more familiar.
Thank you.
@ECHO OFF
@MODE CON COLS=16 LINES=1
REM if no dummy C1 session exists on my RAM disk then we need to copy a blank one there
IF NOT EXIST "Z:\C1\C1.cosessiondb" xcopy /E /D /Q "C:\Program Files\Phase One\C1.20" Z:\C1\ 1> nul 2> nul
REM start C1 if it is not already running, TIMEOUT as need based on PC performance, I think 5 is just a safer value and it does not bother me as it is used just for the first C1 start
REM note - if you did run C1 & close it already after rebooting it will open with the prev raw file - no worries
FOR /F %%x IN ('tasklist /NH /FI "IMAGENAME eq CaptureOne.exe"') DO IF %%x == CaptureOne.exe goto C1RUNNING
start "C1" /B /D"C:\Program Files\Phase One\Capture One 20\" CaptureOne.exe
TIMEOUT 5 1> nul 2> nul
:C1RUNNING
REM OK, now do the trick with links & folders
IF NOT EXIST "Z:%~p1" mkdir "Z:%~p1" 1> nul 2> nul
IF NOT EXIST "Z:%~p1CaptureOne\Cache" mkdir "Z:%~p1CaptureOne\Cache" 1> nul 2> nul
IF NOT EXIST "Z:%~p1%~nx1" mklink "Z:%~p1%~nx1" %1 1> nul 2> nul
IF NOT EXIST "Z:%~p1CaptureOne\Settings130" mklink /D "Z:%~p1CaptureOne\Settings130" "%~dp1" 1> nul 2> nul
IF NOT EXIST "Z:%~p1OUT" mklink /D "Z:%~p1OUT" "%~dp1" 1> nul 2> nul
REM now we are ready to pass a raw file to C1 process
start "C1" /B /D"C:\Program Files\Phase One\Capture One 20\" CaptureOne.exe "Z:%~p1%~nx1"
:LOOP1
IF NOT EXIST "Z:%~p1CaptureOne\Cache\Proxies\%~nx1.cof" GOTO LOOP1
:LOOP2
IF NOT EXIST "Z:%~p1CaptureOne\Cache\Proxies\%~nx1.cop" GOTO LOOP2
REM well sometimes you need to do it again :-), don't ask me why
start "C1" /B /D"C:\Program Files\Phase One\Capture One 20\" CaptureOne.exe "Z:%~p1%~nx1"
TIMEOUT 1 1> nul 2> nul
REM make sure C1 window is on top & maximized
"C:\Program Files\Phase One\Capture One 12\nircmd.exe" win activate process "CaptureOne.exe"
"C:\Program Files\Phase One\Capture One 12\nircmd.exe" win max process "CaptureOne.exe"
---
PS: nircmd - from
https://www.nirsoft.net/utils/nircmd.html