Advertisement
Guest User

Untitled

a guest
Jun 13th, 2018
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. @echo off
  2. set day=-3
  3. echo >"%temp%\%~n0.vbs" s=DateAdd("d",%day%,now) : d=weekday(s)
  4. echo>>"%temp%\%~n0.vbs" WScript.Echo year(s)^& right(100+month(s),2)^& right(100+day(s),2)
  5. for /f %%a in ('cscript /nologo "%temp%\%~n0.vbs"') do set "result=%%a"
  6. del "%temp%\%~n0.vbs"
  7. set "YYYY=%result:~0,4%"
  8. set "MM=%result:~4,2%"
  9. set "DD=%result:~6,2%"
  10. set "d=%yyyy%-%mm%-%dd%"
  11. set "d2=%yyyy%%mm%%dd%"
  12.  
  13. rem echo %d%
  14. rem pause
  15.  
  16. rem Tento ide, ale zabali vsetko
  17. "C:\Program Files\WinRAR\WinRAR.exe" a -afzip %d%"-diff.zip" "C:\adresar1" "C:\adresar2"
  18.  
  19. rem Ale tento nejde
  20. "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