SWADE Playlist
  1. #1

    Quickly zip to Extension (Ext) from Windows file menu (or Mod or Pak)

    To quickly make an extension file from a directory from the Windows menu

    Create a file named "sendToExt.ps1" with contents of:
    $extensionDirectory = "$args"
    $zipFile = $extensionDirectory + ".zip"
    $extFile = $extensionDirectory + ".ext"
    If (Test-path $zipFile) { Remove-Item $zipFile }
    If (Test-path $extFile) { Remove-Item $extFile }
    Add-Type -assembly "system.io.compression.filesystem"
    [io.compression.zipfile]::CreateFromDirectory($extensionDirectory, $zipFile) 
    Rename-Item $zipFile -NewName $extFile
    *Note: this script will keep the original directory but will delete or overwrite any existing .zip or .ext files with the same name

    Then to add to the Windows menu, you have two choices:
    1) To add under the "Send To" menu:
    a) Create a shortcut to the powershell script
    b) Put the shortcut in "C:\Users\<your user name>\AppData\Roaming\Microsoft\Windows\SendTo" (or just paste "shell:sendto" in file explorer)
    b) Change the properties of the shortcut to have target of: powershell.exe "<path to powershell script>\\sendToExt.ps1"

    2) To have as a separate menu item
    a) Create a file name "regAddExt.reg" with contents of:
    Windows Registry Editor Version 5.00
    @="Send To FG Ext"
    [HKEY_CURRENT_USER\Software\Classes\directory\shell\Send To FG Ext\command]
    @="powershell <path to powershell script>\\sendToExt.ps1 \"%1\""
    b) Double-click to run the file which edits the Windows registry

    You can easily modify this to make Mod or Pak files as well by changing the names to ".mod" or ".pak" instead

  2. #2
    LordEntrails's Avatar
    Join Date
    May 2015
    -7 UTC
    Blog Entries
    Nice, thx for sharing.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Fantasy Grounds Fridays Pre

Log in

Log in