• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

Sign in to follow this  

Cant delete 0 byte file Windows 10

Recommended Posts

neufuse    4,392

even tried going into command prompt via the windows 10 trouble shooting and running chkdsk with a full scan... tried manually deleting there... everything

 

chkdsk comes back every time with no problems found, delete just comes back with path not found

Share this post


Link to post
Share on other sites
aphanic    10

It peaked my interest, is the program that creates them publicly available? I wonder how it is creating those files (or those entries).

 

By the way, does it run under System or TrustedInstaller?

Share this post


Link to post
Share on other sites
Peresvet    365
Posted (edited)
1 hour ago, neufuse said:

done that many times, no errors....

 

I've had this issue from the initial windows 10 version all the way up to 2004 now chkdsk shows nothing still

In that case, I'd just forget about it. Can you make those files hidden?

 

Another option is to back-up your data (minus those files) and reformat the damn drive - "it's the only way to be sure😄 

 

 

Share this post


Link to post
Share on other sites
Jim K    15,694

Are they located in a folder which can be deleted (even if it requires temporarily moving wanted files to a temp directory).  What program is creating these files?  What are the file names?

 

What are the details of these files when you powershell Get-ItemProperty   ?

 

Example (fand.txt is file)...

 

PS C:\Users\Jim\desktop> get-itemproperty fand.txt | Format-list -Property * -Force

PSPath            : Microsoft.PowerShell.Core\FileSystem::C:\Users\Jim\desktop\fand.txt
PSParentPath      : Microsoft.PowerShell.Core\FileSystem::C:\Users\Jim\desktop
PSChildName       : fand.txt
PSDrive           : C
PSProvider        : Microsoft.PowerShell.Core\FileSystem
Mode              : -a----
VersionInfo       : File:             C:\Users\Jim\desktop\fand.txt
                    InternalName:
                    OriginalFilename:
                    FileVersion:
                    FileDescription:
                    Product:
                    ProductVersion:
                    Debug:            False
                    Patched:          False
                    PreRelease:       False
                    PrivateBuild:     False
                    SpecialBuild:     False
                    Language:

BaseName          : fand
Target            : {}
LinkType          :
Name              : fand.txt
Length            : 25
DirectoryName     : C:\Users\Jim\desktop
Directory         : C:\Users\Jim\desktop
IsReadOnly        : False
Exists            : True
FullName          : C:\Users\Jim\desktop\fand.txt
Extension         : .txt
CreationTime      : 6/16/2020 18:28:42
CreationTimeUtc   : 6/16/2020 23:28:42
LastAccessTime    : 6/19/2020 19:14:50
LastAccessTimeUtc : 6/20/2020 00:14:50
LastWriteTime     : 6/16/2020 18:28:42
LastWriteTimeUtc  : 6/16/2020 23:28:42
Attributes        : Archive

 

  • Like 1

Share this post


Link to post
Share on other sites
goretsky    1,194

Hello,

 

What is the completely path specification and filename that is showing up for the 0-byte long files? 


Have you checked using a program like Microsoft Sysinternals' handle to see if what process is its owner?

 

Regards,

 

Aryeh Goretsky

 

Share this post


Link to post
Share on other sites
adrynalyne    13,872
Posted (edited)
3 hours ago, neufuse said:

same thing it's like the file isn't there but there is a record to it in the MTF ...

That would imply the files disappear when not in use, wouldn’t it? Does WSL also not think the file exists?

Share this post


Link to post
Share on other sites
neufuse    4,392
3 hours ago, Peresvet said:

In that case, I'd just forget about it. Can you make those files hidden?

 

Another option is to back-up your data (minus those files) and reformat the damn drive - "it's the only way to be sure😄 

 

 

no, you can't even change properties of them... if you go into their properties it just has a red x with "the requested security information is either unavaiable or can't be displayed" for security and for the general tab  everything is blank, accessed, modified, created size etc... only location is there and type of file is just "file"

Share this post


Link to post
Share on other sites
neufuse    4,392
Posted (edited)
2 hours ago, goretsky said:

Hello,

 

What is the completely path specification and filename that is showing up for the 0-byte long files? 


Have you checked using a program like Microsoft Sysinternals' handle to see if what process is its owner?

 

Regards,

 

Aryeh Goretsky

 

there is no owner process.. I can't even delete them using windows 10's safe mode command prompt..

 

I thought maybe file name length was the issue but the full path included is only 170 characters, I've seen long file names in windows from apps that exceeded 255 chars that get messed up with the path included, but nope not even that is the case

2 hours ago, adrynalyne said:

That would imply the files disappear when not in use, wouldn’t it? Does WSL also not think the file exists?

if I go into ubuntu via WSL I get the same thing, there is a zero byte file at the path that can't be accessed or deleted... the files are never "in use" when I'm trying to access them... I can pull this drive and put it into another system and I get the same results

Share this post


Link to post
Share on other sites
neufuse    4,392
3 hours ago, Jim K said:

Are they located in a folder which can be deleted (even if it requires temporarily moving wanted files to a temp directory).  What program is creating these files?  What are the file names?

 

What are the details of these files when you powershell Get-ItemProperty   ?

 

Example (fand.txt is file)...

 


PS C:\Users\Jim\desktop> get-itemproperty fand.txt | Format-list -Property * -Force

PSPath            : Microsoft.PowerShell.Core\FileSystem::C:\Users\Jim\desktop\fand.txt
PSParentPath      : Microsoft.PowerShell.Core\FileSystem::C:\Users\Jim\desktop
PSChildName       : fand.txt
PSDrive           : C
PSProvider        : Microsoft.PowerShell.Core\FileSystem
Mode              : -a----
VersionInfo       : File:             C:\Users\Jim\desktop\fand.txt
                    InternalName:
                    OriginalFilename:
                    FileVersion:
                    FileDescription:
                    Product:
                    ProductVersion:
                    Debug:            False
                    Patched:          False
                    PreRelease:       False
                    PrivateBuild:     False
                    SpecialBuild:     False
                    Language:

BaseName          : fand
Target            : {}
LinkType          :
Name              : fand.txt
Length            : 25
DirectoryName     : C:\Users\Jim\desktop
Directory         : C:\Users\Jim\desktop
IsReadOnly        : False
Exists            : True
FullName          : C:\Users\Jim\desktop\fand.txt
Extension         : .txt
CreationTime      : 6/16/2020 18:28:42
CreationTimeUtc   : 6/16/2020 23:28:42
LastAccessTime    : 6/19/2020 19:14:50
LastAccessTimeUtc : 6/20/2020 00:14:50
LastWriteTime     : 6/16/2020 18:28:42
LastWriteTimeUtc  : 6/16/2020 23:28:42
Attributes        : Archive

 

PS D:\EDI\downloads\incoming-CARRIERS\> get-itemproperty "MDE-ITX-20200121-20200222.DAT"
get-itemproperty : Cannot find path 'D:\EDI\downloads\incoming-CARRIERS\MDE-ITX-20200121-20200222.DAT'
because it does not exist.
At line:1 char:1
+ get-itemproperty "MDE-ITX-20200121-20200222.DAT ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (D:\EDI\downlo...0222.DAT :String) [Get-ItemProperty], ItemNotFo
   undException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemPropertyCommand

Share this post


Link to post
Share on other sites
yuanyasmine    1

Try deleting the file/folder from Safe Mode and check if the issue persists.

Step 1: Boot to Safe Mode.

a. Press the ‘Windows + R’ keys on the keyboard.

b. In the ‘Run’ window type ’MSCONFIG’ and click ‘Ok’.

c. Click the ‘Boot’ tab.

d. Under ‘Boot Options’, select the ‘Safe Boot’ option.

e. Choose the type of safe mode by selecting one of the options below the Safe boot check box:
Select ‘Minimal’.

f. Click OK and then restart your PC.

Share this post


Link to post
Share on other sites
Peresvet    365
17 minutes ago, yuanyasmine said:

Try deleting the file/folder from Safe Mode and check if the issue persists.

Step 1: Boot to Safe Mode.

a. Press the ‘Windows + R’ keys on the keyboard.

b. In the ‘Run’ window type ’MSCONFIG’ and click ‘Ok’.

c. Click the ‘Boot’ tab.

d. Under ‘Boot Options’, select the ‘Safe Boot’ option.

e. Choose the type of safe mode by selecting one of the options below the Safe boot check box:
Select ‘Minimal’.

f. Click OK and then restart your PC.

 

On 6/20/2020 at 10:41 PM, neufuse said:

I can't even delete them using windows 10's safe mode command prompt..

 

Share this post


Link to post
Share on other sites
neufuse    4,392
3 hours ago, yuanyasmine said:

Try deleting the file/folder from Safe Mode and check if the issue persists.

Step 1: Boot to Safe Mode.

a. Press the ‘Windows + R’ keys on the keyboard.

b. In the ‘Run’ window type ’MSCONFIG’ and click ‘Ok’.

c. Click the ‘Boot’ tab.

d. Under ‘Boot Options’, select the ‘Safe Boot’ option.

e. Choose the type of safe mode by selecting one of the options below the Safe boot check box:
Select ‘Minimal’.

f. Click OK and then restart your PC.

* face palm * 

Share this post


Link to post
Share on other sites
Riva    1,337

I just created a 0 bytes file and i was able to delete it just fine

Share this post


Link to post
Share on other sites
Code Name: Lockdown    9,510
4 minutes ago, Riva said:

I just created a 0 bytes file and i was able to delete it just fine

That is not the issue here.  It's part of it sure, but it's not the sole issue.

  • Like 1

Share this post


Link to post
Share on other sites
shockz    7,811

What does robocopy error out with this proposed solution: 

Share this post


Link to post
Share on other sites
Brandon H    3,854

Like I said in my comment from last year; I've run into this a few times going all the way back to XP. I'm guessing it's as you think, there's nothing in the file space but the MFT table thinks there is or something.

Back when I had this issue I tried numerous things all of which have been listed here (besides robocopy) and a few other things and NOTHING worked aside from formatting the drive unfortunately 😕

Share this post


Link to post
Share on other sites
goretsky    1,194

Hello,

One thing I remember from the DOS era is that if you do not have the TEMP environment variable properly defined and do a directory using a pipe ("|") redirection to the MORE command, the temporary file used to buffer the contents of the directory stream to the MORE command would show up only in the directory listing.  I wonder if a similar effect could be coming into play?

 

Regards,

 

Aryeh Goretsky

 

 

Share this post


Link to post
Share on other sites
Joe User    504

Have you tried running streams on the file?

 

https://docs.microsoft.com/en-us/sysinternals/downloads/streams

 

I've heard of files with NTFS streams sometimes causing strange issues like this.

 

Share this post


Link to post
Share on other sites
George P    6,432

I haven't run into a issue like this in years, when I did unlocker worked and I deleted the file.  Since it's created by that specific app you have to use, has it done it before and on other systems or is this isolated to one specific system?

Share this post


Link to post
Share on other sites
Code Name: Lockdown    9,510

Daft question.  What if you open Notepad, type something and try to save over the top of the file?

 

I'm assuing "File cannot be found" still?

Share this post


Link to post
Share on other sites
neufuse    4,392
On 6/23/2020 at 4:04 AM, Code Name: Lockdown said:

Daft question.  What if you open Notepad, type something and try to save over the top of the file?

 

I'm assuing "File cannot be found" still?

yes

 

but update, I tried the latest Ubuntu WSL  release and I can delete them from inside of Ubuntu WSL!

 

Finally!! Now If I could just figure out WHY windows can't do it but WSL can

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.