Forum Discussion

AndrewJenkins's avatar
AndrewJenkins
Iron Contributor
Sep 08, 2026

How to package a zip file with hidden folders and a working local shortcut

I'm publishing a game and need to include a few data files that have to stay in the same folder as the .exe. I want to package everything in a zip that has a hidden folder containing the game files, with a shortcut placed right next to it—so users don't get confused or try to move the .exe out of the folder and break the game.

The shortcut in the image I have doesn't work because it uses an absolute path instead of a relative one. How can I create a shortcut that points to the .exe inside the folder in a way that works after extraction, no matter where the user unzips it?

 

7 Replies

  • Jason_M's avatar
    Jason_M
    Brass Contributor

    For a portable ZIP, a small .cmd launcher is more reliable than copying a Windows shortcut created on your own PC. It can locate the game relative to itself and set the working folder correctly.

    Package it like this:

    Put this inside Play Inversion X.cmd:

    %~dp0 means the folder containing the launcher. pushd makes the game folder the working directory, which matters when the game loads data using relative paths. The quotes handle folder names containing spaces.

    Zip the launcher and Game data folder together. Users should extract the whole ZIP first, then double-click the launcher. Test it by extracting to a different location before distributing it.

    One limitation: the Windows Hidden attribute is not reliably preserved across ZIP tools and extractors. You can mark the folder hidden before packaging, but do not depend on it remaining hidden afterward. Keeping it named “Game data” is a practical fallback.

    The .cmd launcher may briefly show a console window. For a polished release with a game icon, no console flash and reliably created shortcuts, use a small launcher executable or an installer.

  • Downloading online media from a PC is more convenient when the files can be saved directly to a chosen folder without going through multiple browser pages. gallery-dl is a command-line utility that can be configured for supported sites and used as part of a YouTube Video Downloader workflow.

    How to use a YouTube Video Downloader from the command line

    1. Make sure Python is installed on your computer, then open Command Prompt or PowerShell.
    2. Install gallery-dl with the following command:
    3. pip install -U gallery-dl
    4. Create a folder where you want downloaded media to be stored and use it as your working directory.
    5. Copy the URL of the supported page or media you want to process, then provide the URL to the program through the command line.
    6. Allow the download to finish and check the output folder to make sure the expected files were saved correctly.
    7. If you use the tool regularly, its configuration file can be used to control options such as output directories, filenames, and extractor-specific settings.

    The command-line approach gives you direct control over where downloaded files are stored and how they are organized; always check that the URL is supported and that you have permission to save the content.

     

  • When a browser cannot save an online video directly, a web-based YouTube Video Downloader can provide a simpler way to keep a copy for offline viewing. Downr works in the browser, so there is no separate desktop program to install.

    Open Downr, copy the link of the video you have permission to save, and paste it into the input field. Let the site analyze the link, then choose one of the available video quality options. Higher resolutions may take longer to prepare and produce larger files. Select the option you need and follow the download prompt to save the video to your device.

    After the download finishes, play the file and check the picture quality and audio before closing the browser. With a YouTube Video Downloader, the available quality depends on the original upload and the formats the service can retrieve, so not every video will provide the same resolution choices.

  • Low-resolution downloads are often caused by the available source quality or the format selected during retrieval. For command-line downloading, a YouTube Video Downloader may offer more control over file selection, but gallery-dl is primarily designed for downloading image galleries and media collections rather than serving as a dedicated video downloader for this site.

    How to use a YouTube Video Downloader

    Op. 1: Install the program with Python and open Command Prompt or Terminal.

    Op. 2: Copy the URL of the content you have permission to save.

    Op. 3: Run a single download command:

    gallery-dl "URL"

    Op. 4: Wait for the process to finish, then check the configured download folder for the saved files.

    Op. 5: Verify the downloaded format and quality before moving or organizing the files.

    Notes:

    • Support varies depending on the website.
    • Available quality depends on the source.
    • It is better suited to galleries and media collections than general video downloading.
  • xartin's avatar
    xartin
    Brass Contributor

    The %CD% variable expands to the folder from which the shortcut is launched, so as long as the shortcut remains in the same directory as the hidden folder, it will find the game executable regardless of where the user extracts the archive.

  • Chloe1895's avatar
    Chloe1895
    Brass Contributor

    The trick is to make the shortcut launch cmd.exe with the /c start command, which then opens your executable using a relative path from the shortcut's location.

  • CooperCal's avatar
    CooperCal
    Tin Contributor

    For users, this .bat file acts like a shortcut. Double-clicking it runs the game regardless of where the folder is extracted.