Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- set day=-3
- echo >"%temp%\%~n0.vbs" s=DateAdd("d",%day%,now) : d=weekday(s)
- echo>>"%temp%\%~n0.vbs" WScript.Echo year(s)^& right(100+month(s),2)^& right(100+day(s),2)
- for /f %%a in ('cscript /nologo "%temp%\%~n0.vbs"') do set "result=%%a"
- del "%temp%\%~n0.vbs"
- set "YYYY=%result:~0,4%"
- set "MM=%result:~4,2%"
- set "DD=%result:~6,2%"
- set "d=%yyyy%-%mm%-%dd%"
- set "d2=%yyyy%%mm%%dd%"
- rem echo %d%
- rem pause
- rem Tento ide, ale zabali vsetko
- "C:\Program Files\WinRAR\WinRAR.exe" a -afzip %d%"-diff.zip" "C:\adresar1" "C:\adresar2"
- rem Ale tento nejde
- "C:\Program Files\WinRAR\WinRAR.exe" a -ta%d2%" -afzip %d%"-diff.zip" "C:\adresar1" "C:\adresar2"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement