How to delete a broken symbolic file link in Windows











up vote
2
down vote

favorite
1












So I have a file in a directory with an unicode name. I wanted to create a link to this elsewhere, but when I tried to do it with a command like mklink file "S:ディレクトリtarget" in cmd.exe, the result was a broken symlink (the unicode characters showed up as boxes in the command). Running attrib on the links just says "The target of the symbolic link file does not exist", so it certainly seems broken for good.



And now the really annoying part about this: I can't delete the damn thing. Trying to do it in Explorer just tells me I can't, trying to use del from an elevated prompt just gives me "Access is denied." Trying to overwrite the symlink with a new (working) one doesn't work either, just gives me "Cannot create a file when that file already exists."



So, how could I go about deleting this? And as a bonus question, any ideas on how to get symbolic links for unicode paths working?










share|improve this question






















  • maybe the rd command can help you - ss64.com/nt/rd.html
    – xypha
    Aug 23 at 14:12















up vote
2
down vote

favorite
1












So I have a file in a directory with an unicode name. I wanted to create a link to this elsewhere, but when I tried to do it with a command like mklink file "S:ディレクトリtarget" in cmd.exe, the result was a broken symlink (the unicode characters showed up as boxes in the command). Running attrib on the links just says "The target of the symbolic link file does not exist", so it certainly seems broken for good.



And now the really annoying part about this: I can't delete the damn thing. Trying to do it in Explorer just tells me I can't, trying to use del from an elevated prompt just gives me "Access is denied." Trying to overwrite the symlink with a new (working) one doesn't work either, just gives me "Cannot create a file when that file already exists."



So, how could I go about deleting this? And as a bonus question, any ideas on how to get symbolic links for unicode paths working?










share|improve this question






















  • maybe the rd command can help you - ss64.com/nt/rd.html
    – xypha
    Aug 23 at 14:12













up vote
2
down vote

favorite
1









up vote
2
down vote

favorite
1






1





So I have a file in a directory with an unicode name. I wanted to create a link to this elsewhere, but when I tried to do it with a command like mklink file "S:ディレクトリtarget" in cmd.exe, the result was a broken symlink (the unicode characters showed up as boxes in the command). Running attrib on the links just says "The target of the symbolic link file does not exist", so it certainly seems broken for good.



And now the really annoying part about this: I can't delete the damn thing. Trying to do it in Explorer just tells me I can't, trying to use del from an elevated prompt just gives me "Access is denied." Trying to overwrite the symlink with a new (working) one doesn't work either, just gives me "Cannot create a file when that file already exists."



So, how could I go about deleting this? And as a bonus question, any ideas on how to get symbolic links for unicode paths working?










share|improve this question













So I have a file in a directory with an unicode name. I wanted to create a link to this elsewhere, but when I tried to do it with a command like mklink file "S:ディレクトリtarget" in cmd.exe, the result was a broken symlink (the unicode characters showed up as boxes in the command). Running attrib on the links just says "The target of the symbolic link file does not exist", so it certainly seems broken for good.



And now the really annoying part about this: I can't delete the damn thing. Trying to do it in Explorer just tells me I can't, trying to use del from an elevated prompt just gives me "Access is denied." Trying to overwrite the symlink with a new (working) one doesn't work either, just gives me "Cannot create a file when that file already exists."



So, how could I go about deleting this? And as a bonus question, any ideas on how to get symbolic links for unicode paths working?







windows windows-8 symbolic-link






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Oct 31 '13 at 10:25









Daiz

1112




1112












  • maybe the rd command can help you - ss64.com/nt/rd.html
    – xypha
    Aug 23 at 14:12


















  • maybe the rd command can help you - ss64.com/nt/rd.html
    – xypha
    Aug 23 at 14:12
















maybe the rd command can help you - ss64.com/nt/rd.html
– xypha
Aug 23 at 14:12




maybe the rd command can help you - ss64.com/nt/rd.html
– xypha
Aug 23 at 14:12










1 Answer
1






active

oldest

votes

















up vote
0
down vote













https://stackoverflow.com/questions/388490/unicode-characters-in-windows-command-line-how



You need to insert the command: chcp 65001



"which will change the code page to UTF-8. Also, you need to use Lucida console fonts."



Also note: "Note there are serious implementation bugs in Windows's code page 65001 support which will break many applications that rely on the C standard library IO methods, so this is very fragile. (Batch files also just stop working in 65001.) Unfortunately UTF-8 is a second-class citizen in Windows"






share|improve this answer























  • Sounds quite fragile indeed. Guess I'll just rename the directories or move the files I want to link instead. Still need a solution for the main issue of getting rid of the broken symlinks, though.
    – Daiz
    Oct 31 '13 at 10:40











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f667766%2fhow-to-delete-a-broken-symbolic-file-link-in-windows%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













https://stackoverflow.com/questions/388490/unicode-characters-in-windows-command-line-how



You need to insert the command: chcp 65001



"which will change the code page to UTF-8. Also, you need to use Lucida console fonts."



Also note: "Note there are serious implementation bugs in Windows's code page 65001 support which will break many applications that rely on the C standard library IO methods, so this is very fragile. (Batch files also just stop working in 65001.) Unfortunately UTF-8 is a second-class citizen in Windows"






share|improve this answer























  • Sounds quite fragile indeed. Guess I'll just rename the directories or move the files I want to link instead. Still need a solution for the main issue of getting rid of the broken symlinks, though.
    – Daiz
    Oct 31 '13 at 10:40















up vote
0
down vote













https://stackoverflow.com/questions/388490/unicode-characters-in-windows-command-line-how



You need to insert the command: chcp 65001



"which will change the code page to UTF-8. Also, you need to use Lucida console fonts."



Also note: "Note there are serious implementation bugs in Windows's code page 65001 support which will break many applications that rely on the C standard library IO methods, so this is very fragile. (Batch files also just stop working in 65001.) Unfortunately UTF-8 is a second-class citizen in Windows"






share|improve this answer























  • Sounds quite fragile indeed. Guess I'll just rename the directories or move the files I want to link instead. Still need a solution for the main issue of getting rid of the broken symlinks, though.
    – Daiz
    Oct 31 '13 at 10:40













up vote
0
down vote










up vote
0
down vote









https://stackoverflow.com/questions/388490/unicode-characters-in-windows-command-line-how



You need to insert the command: chcp 65001



"which will change the code page to UTF-8. Also, you need to use Lucida console fonts."



Also note: "Note there are serious implementation bugs in Windows's code page 65001 support which will break many applications that rely on the C standard library IO methods, so this is very fragile. (Batch files also just stop working in 65001.) Unfortunately UTF-8 is a second-class citizen in Windows"






share|improve this answer














https://stackoverflow.com/questions/388490/unicode-characters-in-windows-command-line-how



You need to insert the command: chcp 65001



"which will change the code page to UTF-8. Also, you need to use Lucida console fonts."



Also note: "Note there are serious implementation bugs in Windows's code page 65001 support which will break many applications that rely on the C standard library IO methods, so this is very fragile. (Batch files also just stop working in 65001.) Unfortunately UTF-8 is a second-class citizen in Windows"







share|improve this answer














share|improve this answer



share|improve this answer








edited May 23 '17 at 12:41









Community

1




1










answered Oct 31 '13 at 10:33









Ash King

1,0203916




1,0203916












  • Sounds quite fragile indeed. Guess I'll just rename the directories or move the files I want to link instead. Still need a solution for the main issue of getting rid of the broken symlinks, though.
    – Daiz
    Oct 31 '13 at 10:40


















  • Sounds quite fragile indeed. Guess I'll just rename the directories or move the files I want to link instead. Still need a solution for the main issue of getting rid of the broken symlinks, though.
    – Daiz
    Oct 31 '13 at 10:40
















Sounds quite fragile indeed. Guess I'll just rename the directories or move the files I want to link instead. Still need a solution for the main issue of getting rid of the broken symlinks, though.
– Daiz
Oct 31 '13 at 10:40




Sounds quite fragile indeed. Guess I'll just rename the directories or move the files I want to link instead. Still need a solution for the main issue of getting rid of the broken symlinks, though.
– Daiz
Oct 31 '13 at 10:40


















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f667766%2fhow-to-delete-a-broken-symbolic-file-link-in-windows%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Plaza Victoria

In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...