Jump to content

How to compress a folder and keep all it's internal structure of subfolder and files, using internal functions?


Recommended Posts

Hey!

I'd like to be able to package a folder, keeping it's structure of subfolders and files, using only internal AutoIt functions or Windows Vista and above APIs.

I don't want to use an external program, such as rar.exe or 7zip.exe. I can easily do it that way, but I'd like to use only included tools.

I've searched the help files and the forums, on the help files I've found nothing; on the forums, only this, which is an amazing work, but it's very heavy and depends on 7zip: '?do=embed' frameborder='0' data-embedContent>>

Am I missing some obvious compression algorythm?

I know what I'm asking is hard to do, I don't think there's a clear cut way to do it.

Link to comment
Share on other sites

kadanefewi,

If you do not want to use an external program because you do not want to have to ensure that it is installed on whatever PC your compilation is run on you can use "FileInstall" (not sure about copyright infringements).  See the Help file.

kylomas

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Link to comment
Share on other sites

>Here is a UDF which offers alternative data compression.

You might consider using _FileListToArrayRec to implement your folder structure.

EDIT: oops, forgot link.

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

... or Windows Vista and above APIs.

 

'?do=embed' frameborder='0' data-embedContent>>

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...