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?
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With