Rather simple, took me a couple of minutes to write...but an hour to work out why it wasn't working. It's only been tested on dual pane listers, it gets imported as a custom User Command and then you can add it as a Context Menu item, (ZeroArc), for folders.
Anyway, a couple of days ago I was playing around with RoboCopy, noted the /CREATE switch and the rest is history as they say.
Formatted for XML with the GeSHI Syntax Highlighter [copy or print]
<?xml version="1.0" encoding="UTF-8"?> <usercommand backcol="none" hide_from_menu="no" textcol="none"> <label>ZeroArc</label> <tip>Produce a file tree archive</tip> <user_label>ZeroArc</user_label> <icon1>#default:newzipfile</icon1> <function type="normal"> <instruction>@runmode hide</instruction> <instruction>@nofilenamequoting</instruction> <instruction>@sync:robocopy "{filepath|noterm}" "{destpath$}{file}" /CREATE /E /np /nfl /ndl /njh /njs</instruction> <instruction>COPY MOVE ARCHIVE=.7z,KEEPFOLDER "{destpath$}{file}" AS "{file}"</instruction> </function> </usercommand>
Creates the zero length files/folder structure in the destination lister and then moves it into a 7-Zip archive - on my machine it did 27272 files/223 folders in about 20 seconds, (to RAM or HDD).
Change the .7z to .zip if you want a ZIP archive.
Anyway, hope it's useful for someone.
UPDATED: Forgot to take spaces in names into account.








Logged

