Skip to content

Latest commit

 

History

History
65 lines (43 loc) · 1.37 KB

File metadata and controls

65 lines (43 loc) · 1.37 KB

Unmark

Remove Mark of the Web

Small C# console app that removes Mark of the Web from all files in the current folder and its subdirectories.

On Windows, downloaded files can carry a Zone.Identifier alternate data stream, which causes them to be treated as coming from the internet. This app deletes that stream recursively.

Features

  • removes Mark of the Web recursively
  • works on the current folder by default
  • optionally accepts a target folder path
  • simple console output with summary
  • MIT licensed

Usage

Run in the target folder:

Unmark.exe

Or pass a folder path:

Unmark.exe "C:\Path\To\Folder"

How it works

The app looks for the NTFS alternate data stream:

:Zone.Identifier

For each file found under the target folder, it checks whether that stream exists and deletes it if present.

Requirements

  • Windows
  • .NET 8.0 Desktop Runtime
  • NTFS filesystem
  • .NET compatible C# console project

Example

Removing Mark of the Web from:
C:\Temp\MyFiles

Unblocked: C:\Temp\MyFiles\file1.zip
Unblocked: C:\Temp\MyFiles\subdir\file2.dll

Done. Checked: 42, Unblocked: 2, Failed: 0

Notes

  • this only affects files, not directories
  • this only works on Windows filesystems that support alternate data streams
  • files without Mark of the Web are left unchanged
  • some files may fail due to permissions or locks