FG Spreadshirt Swag
  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:
    Code:
    $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:
    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USER\Software\Classes\directory\shell]
    @="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
    Location
    -7 UTC
    Posts
    17,150
    Blog Entries
    9
    Nice, thx for sharing.

    Problems? See; How to Report Issues, Bugs & Problems
    On Licensing & Distributing Community Content
    Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
    Note, I am not a SmiteWorks employee or representative, I'm just a user like you.

Thread Information

Users Browsing this Thread

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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Starfinder Playlist

Log in

Log in