How to delete file along with all hard links on windows?

Rob Graber

This question's context is the Windows operating system...XP on up to Win 7/8.

If you create a file on a drive and then create one or more hard links to that file, then if you delete the original file the file still resides on the disk since the hard links still refer to that file.

Is there some simple way (delete option?) to be able to remove the file and all of the hard links without having to search around for the hard links (not sure how you even find those from a simple windows user interface standpoint...I know you can do it with programming code, but I am looking for a user-level solution within the standard operating system user interface)?

Thanks!

EDIT:

I found this question/answer that discusses how to programmatically use c++ to find additional links to the file, but still searching for a standard windows UI or command line method. How to find all hard links to a file in Windows starting from XP in C++

Also found this link on superuser.com that doesn't give me much hope. Help! https://superuser.com/questions/366739/how-can-i-find-hard-links-on-windows

Rob Graber

There is a free utility called ln.exe that has a --list option that finds all of the hard links related to a given filename. Its download also comes with a batch file (DeleteAllHardlinks.bat) that will automatically delete all of the hard links to a given file name.

This pretty much addresses my need, so I will consider this a good answer.

Here is a link to the page for this utility. Hope someone else can benefit from this in the future!

http://schinagl.priv.at/nt/ln/ln.html

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Find all hard links of a certain file

From Dev

Finding all symbolic and hard links to a file on UNIX

From Dev

Didn't return all hard links to a file

From Dev

How can I find hard links on Windows?

From Dev

Print hard links on file

From Dev

How to determine whether a drive supports hard links in Windows XP?

From Dev

How does Robocopy handle file system links (symbolic links, hard links and junctions)?

From Dev

How to remove hard links on ubuntu without losing original file?

From Dev

Are hard links equivalent to Windows shortcuts?

From Dev

Are hard links equivalent to Windows shortcuts?

From Dev

How To Delete Uploaded File On Local Host Along With User Account In Php

From Dev

How To Delete Uploaded File On Local Host Along With User Account In Php

From Dev

Counting hard links to a file in Go

From Dev

Editing a file with several hard links

From Dev

Simple way to delete a file and all its links (simultaneously)

From Dev

How to view all the Symbolic links,Junction points,Hard links in a Folder using dir?

From Dev

How to extract all links from pdf file?

From Dev

How to delete the Windows directory from an old hard drive?

From Dev

thoroughly find all links (hard and symlinks, and any combination thereof) leading to a file/dir

From Dev

Does Cygwin support hard links in Windows 8?

From Dev

Hard links break in Windows 7 Pro

From Dev

Inherited a HTML file with hard links to static files

From Dev

File copy tools that will preserve hard links at destination

From Dev

How to delete all .txt files in Windows 8?

From Dev

How to delete a record along with all related records in ASP.NET (C#)

From Dev

How to delete a record along with all related records in ASP.NET (C#)

From Dev

How to delete all lines specified in another file

From Dev

How to delete a file in all snapshots on a btrfs system?

From Dev

How to delete all duplicate hardlinks to a file?

Related Related

  1. 1

    Find all hard links of a certain file

  2. 2

    Finding all symbolic and hard links to a file on UNIX

  3. 3

    Didn't return all hard links to a file

  4. 4

    How can I find hard links on Windows?

  5. 5

    Print hard links on file

  6. 6

    How to determine whether a drive supports hard links in Windows XP?

  7. 7

    How does Robocopy handle file system links (symbolic links, hard links and junctions)?

  8. 8

    How to remove hard links on ubuntu without losing original file?

  9. 9

    Are hard links equivalent to Windows shortcuts?

  10. 10

    Are hard links equivalent to Windows shortcuts?

  11. 11

    How To Delete Uploaded File On Local Host Along With User Account In Php

  12. 12

    How To Delete Uploaded File On Local Host Along With User Account In Php

  13. 13

    Counting hard links to a file in Go

  14. 14

    Editing a file with several hard links

  15. 15

    Simple way to delete a file and all its links (simultaneously)

  16. 16

    How to view all the Symbolic links,Junction points,Hard links in a Folder using dir?

  17. 17

    How to extract all links from pdf file?

  18. 18

    How to delete the Windows directory from an old hard drive?

  19. 19

    thoroughly find all links (hard and symlinks, and any combination thereof) leading to a file/dir

  20. 20

    Does Cygwin support hard links in Windows 8?

  21. 21

    Hard links break in Windows 7 Pro

  22. 22

    Inherited a HTML file with hard links to static files

  23. 23

    File copy tools that will preserve hard links at destination

  24. 24

    How to delete all .txt files in Windows 8?

  25. 25

    How to delete a record along with all related records in ASP.NET (C#)

  26. 26

    How to delete a record along with all related records in ASP.NET (C#)

  27. 27

    How to delete all lines specified in another file

  28. 28

    How to delete a file in all snapshots on a btrfs system?

  29. 29

    How to delete all duplicate hardlinks to a file?

HotTag

Archive