Hirdetés

Új hozzászólás Aktív témák

  • sztanozs
    veterán

    Próbáltam azt is, de azzal se ment. %PROGRAMFILES(X86)%
    Környezeti változó megint egy kis túlkomplikálása a dolgoknak. A legegyszerűbb ami elsőre is működött, hogy a cmd /c -ben egy másik batch file-t hivok meg, ott frankón működött escape-lés nélkül a 7zip elérése.
    De ez megint egy hibalehetőség. Később ha új gépre lesz rakva akkor ott is minden beállítást újra csinálni...
    Nem akarok én bonyolult dolgokat, de a legjobb az volna, ha a jóképességű cmd tudná normálisan kezelni amit kell.

    fyki:
    If /C or /K is specified, then the remainder of the command line after
    the switch is processed as a command line, where the following logic is
    used to process quote (") characters:
    1. If all of the following conditions are met, then quote characters
    on the command line are preserved:
    - no /S switch
    - exactly two quote characters
    - no special characters between the two quote characters,
    where special is one of: &<>()@^|

    - there are one or more whitespace characters between the
    two quote characters
    - the string between the two quote characters is the name
    of an executable file.
    2. Otherwise, old behavior is to see if the first character is
    a quote character and if so, strip the leading character and
    remove the last quote character on the command line, preserving
    any text after the last quote character.

    talan igy jo lesz:
    IF EXIST "%A510%" (
    FORFILES /P "%A510%" /S /M *.* /C "cmd /C "if @isdir==FALSE if @fsize "c:\Program Files (x86)\7-Zip\7z.exe" a %b_backup%\%fullstamp%.zip @FILE"
    )

Új hozzászólás Aktív témák