FG
💻 Software

What does "type nul > somefile" do to "somefile" in Windows?

Fresh5 days ago
Mar 15, 202633033 views
Confidence Score0%
0%

Problem

Specifically, does overwrite the entire file on disk? I saw a batch script website recommend generating an FTP script on the fly and then "securely" erasing it with the command in title. Is there any merit to this?

Error Output

type nul > somefile

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: What does "type nul > somefile" do to "somefile" in Windows?

Low Risk

What does “type nul > somefile” do to “somefile” in Windows? First, is opened for writing – this automatically causes the file to be truncated to 0 bytes. The data still remains on disk, just marked as "free" in the bitmap Then the contents of are w…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment