开发者

zip a folder with exceptions of few particular files through batch

I tried to find the answer to this in several places and failed, so here it goes:

I have a directory, say, "Project" which has a lot of sub directories and files. I want to make a batch program which just zips this Project directory. But also, I want to skip just a few particular files and just one folder.

I figured that I have to iterate all items and add them to zip one by one, and I dont know how to do this.. or is there a better way to do this?

I tried this:

@ECHO OFF
start c:\"Program Files (x86)"\WinRAR\WinRAR.exe %CUR-DATE%.ZIP Project\*.*
pause

just to see if it works.. Winrar is installed in t开发者_如何学JAVAhat location.. for starters I thought I would see if zipping all files work.. but it dint work, no error, nothing, it just runs and quits.

Any Idea where I should start?

Many thanks!


You can use the -x@ExcludeFilesList.txt switch.

The manual for this command line interface switch is here.

HTH!

Just curious... Why don't you use the (") to enclose the whole Winrar Path+Filname spec instead of just the "Program Files (x86)" part?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜