문제

Iam really new to batch files so pls bear with me. I want to make a batch file that can take folders from different locations and then zip it in to one win rar file in a location like

c:\projects\test 
c:\www\site
c:\logs\office

to

c:backup\{{date}}_backup.rar

thanx in advance

도움이 되었습니까?

해결책

@echo off
(
echo c:\projects\test 
echo c:\www\site
echo c:\logs\office
)>list.txt
"%programfiles%\winrar\rar" a "c:\backup\%date:/=-%_backup.rar" @list.txt

If you are on Win-x64 set the rar path: "%programfiles(x86)%\winrar\rar"

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top