batch script to zip a folder without using external softwares

后端 未结 2 906
广开言路
广开言路 2020-12-06 22:44

I have folder with the following structure

folder subfolder(empty) subfolder file1.bat file2.bat file3.bat

How do I go about writing a batch f

2条回答
  •  青春惊慌失措
    2020-12-06 23:39

    With Shell.Application level 1 empty folders are always skipped.You can test by yourself with selecting a bunch of files including empty folders and try to paste them in a zip file through windows explorer (which is actually what is used by shell application).As workaround you can copy the folder you want in another empty folder and zip the new folder. Then you'll have level 2 empty directories which should be zipped.

提交回复
热议问题