topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday March 29, 2024, 9:32 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Idea: Zip as a drive  (Read 7844 times)

Nuri

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 17
    • View Profile
    • Donate to Member
Idea: Zip as a drive
« on: July 27, 2005, 04:52 PM »
I frequently need to work with lot of small files to transfer them easily i zip them together.
I would like a plugin for total commander or a stand alone program wich treats a zip file as a virtual drive.

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
DONE: Zip as a drive
« Reply #1 on: July 31, 2005, 08:07 PM »
 :) Here's a very quick hack, so be careful no to delete any of your zip files.

DriveZip creates a virtual drive from a zip file. It asks for a zip file, expands it and substs it to create a virutal drive and opens it in Explorer. Now you can add and remove files from it. It then asks if you want to recompress the zip file or cancel.

Installation:
1: Download and install AutoHotKey from www.autohotkey.com.
2: Create a folder called DriveZip in your programs folder and save the script below as DriveZip.ahk in there.
3: Download www.freebyte.com/download/fbzpack.exe and extract the file FBZip.exe to the DriveZip folder.

Skrommel


;DriveZip.ahk
;Creates a virtual drive from a zip file
;Skrommel @2005

FINDDRIVE:
DriveGet,list,List
drive=67
Loop,24
{
  Transform,zipdrive,Chr,%drive%
  IfNotInString,list,%zipdrive%
    Break
  drive+=1
}
If drive=91
{
  MsgBox,0,DriveZip,No available drive letters
  ExitApp
}

SELECT:
FileSelectFile,zipfile,3,,Select the ZIP-file, ZIP-files (*.zip)
If zipfile=
{
  MsgBox,1,DriveZip,No file selected. Quit?
  IfMsgBox,OK
    ExitApp
  Goto,SELECT
}

EXTRACT:
RunWait,fbzip -e -p "%zipfile%" "%A_WorkingDir%\%zipdrive%"
RunWait,Subst %zipdrive%: "%A_WorkingDir%\%zipdrive%"
FileAppend,%A_WorkingDir%\%zipdrive%\DriveZip.ini,
Run,Explorer /e`,%zipdrive%:\

CANCEL:
Sleep,1000
MsgBox,1,DriveZip,ZIP-file extracted to %zipdrive%:`n`nPress OK to Recompress`nPress Cancel to clean up and Quit
IfMsgBox,Cancel
{
  FileRemoveDir, %A_WorkingDir%\%zipdrive%, 1
  Run,Subst %zipdrive%: /d
  ExitApp
}

COMPRESS:
FileDelete, %zipfile%
RunWait,fbzip -a -r -p "%zipfile%" "%zipdrive%:\"
FileRemoveDir, %A_WorkingDir%\%zipdrive%, 1
Run,Subst %zipdrive%: /d
ExitApp

Nuri

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 17
    • View Profile
    • Donate to Member
Re: Idea: Zip as a drive
« Reply #2 on: August 01, 2005, 01:59 AM »
Thanks!