2017-05-24 14 views
0

이전의 기호를 삭제하고 각 병에 대한 기호를 다시 작성하기 위해 많은 jar 파일을 반복해야하므로이 스크립트를 창에 적용하면 작동하지만 잘 작동하지만 '경고'메시지가 나타나면 중지됩니다. 그리고 나는 많은 시간을 '닫기'를 클릭해야한다. 경고는 "파일을 찾을 수 없습니다."때문입니다.WinRAR 경고를 프로그래밍 방식으로 무시하는 방법?

@echo off 
REM iterate over jar files in path 
for %%x in (C:\My\Path\to\jar\files\*.jar) do (
echo Jar name: %%~nx 
echo ------------------------------------- 

REM delete previous signatures 
"C:\Program Files\WinRAR\WinRAR.exe" d %%x *.RSA *.SF 

REM execute sign command 
C:\My\Path\To\jarsigner.exe -keystore C:\My\Path\to\mykeystore.jks -storepass myStorepassKey -keypass myKeyspassKey %%x keys_alias 

) 
+0

명령 행 유틸리티는 WinRAR과 분포 (라고 rar.exe)의 일부가되어야합니다. 이것은 당신을 위해 그것을해야합니다. – sb9

+0

팁을위한 Thx. 하지만 난 readme sais rar 파일, zip 중 하나에 대해서만 작동합니다. – tomyforever

답변

1

본질적으로 zip 파일 인 .jar 파일을 편집 중이므로 WinRAR을 사용하지 않아도됩니다.

zip 명령은 zip 파일의 항목을 삭제하는 방법을 제공합니다. 또한, Windows에서 사용할 수있는 7zip이 설치된 경우 7z d archive.jar *.RSA -r이 트릭을 수행 할 수 있습니다.

은 참조 : How to delete a file from multiple zip archives using 7-Zip

+0

7zip으로 작업하기 (설치해야만 함). 경고를 표시하지 않습니다. – tomyforever

+1

당신에게 좋은 일이지만, rar.exe로 해본 적이있다. 당신이 가진 유일한 응용 프로그램이라고 가정 해 보자. –

0

내가 C:\Program Files\WinRAR\rar.exe /?

을 할 경우 내가 얻을 당신이 아니라 실행하는 RAR을 사용한다는 뜻 모든 명령 및 스위치 :

"C:\Program Files\WinRAR\rar" d %%x *.RSA *.SF 

Jar 파일을 효과적으로 압축된다 파일.

도움 출력 : 만약 내가 올바르게 기억

<Commands> 

    a    Add files to archive 
    c    Add archive comment 
    ch   Change archive parameters 
    cw   Write archive comment to file 
    d    Delete files from archive 
    e    Extract files without archived paths 
    f    Freshen files in archive 
    i[par]=<str> Find string in archives 
    k    Lock archive 
    l[t[a],b]  List archive contents [technical[all], bare] 
    m[f]   Move to archive [files only] 
    p    Print file to stdout 
    r    Repair archive 
    rc   Reconstruct missing volumes 
    rn   Rename archived files 
    rr[N]   Add data recovery record 
    rv[N]   Create recovery volumes 
    s[name|-]  Convert archive to or from SFX 
    t    Test archive files 
    u    Update files in archive 
    v[t[a],b]  Verbosely list archive contents [technical[all],bare] 
    x    Extract files with full path 
+0

대답은 Thx이다. 그러나 최소한 (RAR 5.10) 버전의 readme 파일은 rar 형식으로 만 작동합니다. – tomyforever

+0

글쎄, rar은 꽤 많은 zip 파일이므로 여전히 작동해야합니다. 결코 적게, 당신은 지금 분류됩니다 :) –