Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot delete aux file [closed]

Tags:

windows

enter image description here

I was working on a React project and was creating a higher order element when I named the file Aux.js. Now I cannot delete it or change its name. Is there anything I can do?

like image 542
Ash Avatar asked Mar 19 '18 05:03

Ash


People also ask

How do you force delete a file that won't delete?

One is simply using the delete option, and the other one is deleting files permanently. When you can't delete a file normally, you can delete undeletable files Windows 10 by selecting the target file or folder and then press Shift + Delete keys on the keyboard for a try.

Why can't I delete a program file?

Close all programs In most cases, the reason you cannot delete a file is quite simple. The file or a file from the folder is still open or being used by another program.


1 Answers

This problem is the same as the CON issue on Windows, see Windows and renaming folders, the 'con' issue

Long story short: https://msdn.microsoft.com/en-us/library/aa365247.aspx indicates that AUX is also a reserved word within Windows (same as CON is) and therefore resides within the Win32 Device Namespace - as opposed to the Win32 File Namespace where normal files reside.

Fixing the issue

You cannot use the file name Aux.js on Windows, use e.g. Auxx.js.

Removing the file

You can delete the device file by explicitly addressing the device namespace via the prefix \\.\. If the file resides within, for example, C:\temp\Aux.js, then the following command will delete it:

del \\.\C:\temp\Aux.js

HTH

like image 148
Boris Avatar answered Sep 19 '22 07:09

Boris