Hirdetés

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

  • sztanozs
    veterán

    Win11-en itthon:
    Ez működik:
    FORFILES /P "%A510%" /S /M *.* /C "cmd /S /C ^0x22c:\Program^ Files^ ^(x86)\ImgBurn\ImgBurn.exe^0x22"

    Ezek nem
    FORFILES /P "%A510%" /S /M *.* /C "cmd /S /C ^0x22c:\Program Files 0x28x860x29\ImgBurn\ImgBurn.exe^0x22"
    '"c:\Program' is not recognized as an internal or external command,
    operable program or batch file.

    sztanozs - elvileg ez a te mintád ami szintén nem megy a win11-en.
    FORFILES /P "%A510%" /S /M *.* /C "cmd /S /C 0x22c:\Program Files 0x28x860x29\ImgBurn\ImgBurn.exe0x22"
    'c:\Program' is not recognized as an internal or external command,
    operable program or batch file.

    FORFILES /P "%A510%" /S /M *.* /C "cmd /S /C "c:\Program Files 0x28x860x29\ImgBurn\ImgBurn.exe""
    FORFILES /P "c:\oem\CareCenter\DebugLog" /S /M *.* /C "cmd /S /C "c:\Program Files 0x28x860x29\ImgBurn\ImgBurn.exe""
    ERROR: Invalid argument/option - 'Files'.

    FORFILES /P "%A510%" /S /M *.* /C "cmd /S /C "c:\Program Files (x86)\ImgBurn\ImgBurn.exe""
    FORFILES /P "c:\oem\CareCenter\DebugLog" /S /M *.* /C "cmd /S /C "c:\Program Files (x86)\ImgBurn\ImgBurn.exe""
    ERROR: Invalid argument/option - 'Files'.

    Powershell:
    $A510="c:\temp\A510\"
    $fullstamp="2023-02-28"
    $b_backup="\\server\backup"
    Get-ChildItem $A510 -recurse -Filter *.* | ForEach-Object {
    if ($_.Attributes -ne "Directory") {
    if ($_.Length -gt 0) {
    Start-Process -WorkingDirectory $A510 -FilePath "c:\Program Files (x86)\7-Zip\7z.exe" -ArgumentList "a `"$($b_backup)$($fullstamp).zip`" `"$($_.Directory)\$($_.Name)`"" -Wait
    }
    }
    }

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