Skip to content

YKush3 won't release control back to the calling environment after the second ykushcmd is issued. #48

@scorpion83

Description

@scorpion83

I am trying to use a batch file to enable one of the 3 ykush3 downstream ports but I can only issue one ykushcmd either in a command prompt windows or in a batch file. When it tries to execute the second, it does not return control to the command prompt or to the next line in a batch file. In the command prompt, I have to hit -c to get my cursor back after entering the second command. The command does do what it is supposed to but every second command does not release back to the bat file or the command prompt.
example script:

echo Today's date is %date%
REM Parse date into YYYYMMDD
SET YYYYMMDD=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%
REM See if date is even or odd
SET /a OddEven=%YYYYMMDD%%%2

if %OddEven%==0 goto EVEN
if %OddEven%==1 goto ODD

:EVEN
echo Today %date% is even
ykushcmd ykush3 -u 1
@echo Drive 1 enabled
rem Copy data to the enabled port/drive or do work on the drive etc
rem work commands go here....
pause rem pause is just for testing and following when and where the ykushcmd fails to return control
ykushcmd ykush3 -d 1 rem This is where the script control is lost and needs a -C to give back control or a cursor in a cmd prompt window

goto END

:ODD
echo Today %date% is odd
@echo Drive2 enabled
ykushcmd ykush3 -u 2
rem Copy data to the enabled port/drive or do work on the drive etc
rem work commands go here....
pause rem pause is just for testing and following when and where the ykushcmd fails to return control
ykushcmd ykush3 -d 2 rem This is where the script control is lost and needs a -C to give back control or a cursor in a cmd prompt window

:END
pause rem pause is just for testing and following when and where the ykushcmd fails to return control

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions