How can I stop creation of desktop.ini files when I compress (zip) a folder

Chantelle B 0 Reputation points
2025-11-26T05:41:09.32+00:00

Hello,

In order to upload pictures to my companies online range, with a major retailer using SAP Hybris, I need to upload a zipped media file. The process is to:

  • Download the media file from Hybris which contains multiple folders named with product item numbers.
  • Add the images to the relevant folders.
  • Zip the media folder and import to Hybris.

The problem is, upon compressing the folder, a desktop.ini file is created in each folder that contains a picture. When importing to Hybris the desktop.ini file is not recognised, as only pictures files are, and the import will not go ahead. From what research I've done, the only way to remove the .ini files is to unzip the folder, go in and manually delete all the .ini files and rezip. This is super laborious and time consuming when uploading 100 products (with multiple picture files) at a time.

Any suggestions would be greatly appreciated as I'm about to lose my mind!

Thank you, Chantelle

Windows for home | Windows 11 | Files, folders, and storage
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-11-26T05:41:18.8066667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Unfortunately, there is no built-in way to prevent the creation of desktop.ini files when compressing folders in Windows. The desktop.ini file is automatically generated by the Windows operating system to store folder display settings and attributes.

    To manage this issue, you might consider the following alternatives:

    1. Batch Script: You can create a simple batch script to automate the deletion of desktop.ini files after zipping the folder. This way, you can run the script to remove all desktop.ini files from the zipped folder without having to do it manually.
    2. Use a Different Compression Tool: Some third-party compression tools may offer options to exclude certain files or file types when creating a zip file. You could explore tools like 7-Zip or WinRAR to see if they provide this functionality.
    3. Post-Processing: If you have access to a command line, you can use commands to delete all desktop.ini files in the zipped folder after extraction. This could save you time compared to manual deletion.
    4. Folder Structure: If possible, consider restructuring your folders to minimize the number of folders that contain images, which could reduce the number of desktop.ini files created.

    These methods can help streamline your workflow and reduce the time spent on manual deletions.


  2. DYARI BARHAM 29,966 Reputation points Independent Advisor
    2025-11-26T06:20:30.6133333+00:00

    Hi,

    I'm Dyari. Thanks for reaching out. I will be happy to assist you in this regard.

    A desktop.ini file is generated when a folder is compressed in Windows. This compression can prompt Windows to save folder customization settings, such as custom icons and layout preferences, in this hidden file.

    This file is harmless, deleting it will always regenerate it. However, it can be hidden by changing the "show hidden files" option in File Explorer's view settings. Open File Explorer > View tab > Uncheck Hidden Files.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.