Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. ### To compress a folder using Winrar CLI
  2.  
  3. > "%ProgramFiles%\WinRAR\Rar.exe" a -x*\FOLDER_TO_EXCLUDE "RESULT_NAME.rar" .\FOLDER_TO_INCLUDE
  4.  
  5. ### Example :
  6.  
  7. ```bat
  8. @ECHO off
  9. SETLOCAL
  10.  
  11. :: Get date & time now
  12. FOR /f %%a in ('WMIC OS GET LocalDateTime ^| find "."') DO Set _DTS=%%a
  13. Set _datetime=%_DTS:~0,4%-%_DTS:~4,2%-%_DTS:~6,2%@%_DTS:~8,2%-%_DTS:~10,2%-%_DTS:~12,2%
  14.  
  15. "%ProgramFiles%\WinRAR\Rar.exe" a -x*\node_modules -x*\vendor "project-%_datetime%.rar" .\clientSide .\serverSide
  16.  
  17. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement