Issue
There is 2 loader.bin. But one of them has carrage return at the end of the file name. Because of this, I can't delete the file, and directory containing the file. Even with command prompt, I can't delete it. I tried:
del *
del loader.*
above says name or label is wrong. So I
cd ..
dir /x
to check DOS path name of the directory And delete with DOS path del TEXT_L~1 and again, above says name or label is wrong.
I also tried to delete the directory with "\?\" prefix. something like:
del "\\?\D:\directory\blahblah\directory"
and again, name error occurs.
How can I delete this file? Can I have some hint?
I guess that there is carriage return at the end of name because auto complete in git bash complete the name as "loader.bin^M"
I think the file came from wrong command from batch file like:
fasm file.asm loader.bin(here's carriage return)
(fasm is assembler program) Batch file's end of line may have been changed while I changed platform from linux to windows.
EDIT: The file refused to get deleted with following method too.
delete with /P option
del /P directoryName
with DeleteFileW windows API
#include <windows.h> int main() { DeleteFileW(L"E:\\directory\\blahblah\\directory"); }
Solution
this problem never happened to me but maybe using del /P directory
you could be able to remove the file.
Update
You could use a live Linux distro and delete the file you need.
Thanks
Answered By - Alberto Answer Checked By - David Goodson (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.