Zip / Pack Empty Folders

Discuss RoboTask here
Post Reply
RomaRS
Posts: 2
Joined: Fri Oct 07, 2016 8:03 am

Zip / Pack Empty Folders

Post by RomaRS »

Hello all,
i am struggling to create a task that can zip a Folder with a 1 zip file and inside the folder exist many empty folders and some of them have also files.

i tried everything , can someone help with this one

******************
Folder1 (this one should be zipped with Folder1.zip)
+++import1(Folder)
+++Import2(Folder)
+++import500(Folder)
+++++++FileTest.txt (File)
+++++++FileTest2.txt (File)
+++import2000(Folder)

************************

what i did
i loop by folder then
change folder path
then pack
but in result i get inside zip file only the folder that have a file inside
and i need inside the zip all the list with empty folders

Thank you
Oleg
Site Admin
Posts: 3008
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Zip / Pack Empty Folders

Post by Oleg »

Unfortunately Pack Files action ignores empty folders.
But you can use free command line utility to pack folders as you wish.
For example 7-zip. It supports ZIP format too.
To pack the folder with files and empty folders use the command:
  • 7z.exe a -tzip <ZIP_name> <Folder_Name>
Oleg Yershov
RomaRS
Posts: 2
Joined: Fri Oct 07, 2016 8:03 am

Re: Zip / Pack Empty Folders

Post by RomaRS »

Perfect Oleg,

it worked using command line

thx
Post Reply