cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

mks si co without confirmation

CristianC.
3-Newcomer

mks si co without confirmation

Hello

I need an mks cmd command to do the followings:

{

Step 1: check out a member and put an exclusive lock on it

Step 2: if other person has locked the file from step 1 the command should tell me that he cannot made an exclusive lock because the User x has the excluseive lock

}

I tried the following command but it works only for step 1

{

si co --user=yyyyy --password=xxxxxx--hostname=mks2.dc.hella.com --port=7001 --cpid=:none -S _SANDBOX_PATH_\project.pj c:\_FILEPATH__\ONLY_FOR_TEST__3.xls --nodowngradeOnLockConflict -no

}

I need to improove the above command in order to skip the following question :

{

Do you want an exlusive lock?

}

that I am encountering in this moment.

Best Regards,

1 REPLY 1
tdalon
12-Amethyst
(To:CristianC.)

Hello

you could check in your script if the file is locked by someone else before locking

using for example the command

si memberinfo --lockRecordFormat={locker} $file

Parse its output to extract the locker and compare with getenv('username').

HTH

Thierry

Announcements


Top Tags