1

I had a file downloaded from torrent by a media center device on an external hard disk. The file has an invalid filename such as "Movie ** 480p ** NEW.wmv" (without the quotes). I cannot delete or rename the file in any way probably because of the asterisks "**" in the file name. Do you have any ideas what I can do?

Details: The external drive uses an NTFS file system. I tried Windows, Windows command line, OSX terminal, Ubuntu but could not delete it. I can see the file by "dir" or "ls" commands, but when I try to delete or rename I get "No such file or directory" or a similar error. So the file can be shown but cannot be operated on by all OSs I mentioned above. I thought I deleted it with Ubuntu Terminal commands but the file and the folder it is in is only moved to ".Trash" folder and it is stuck there.

I tried various suggestions in various forums:

  • rm -r
  • rm *
  • del *
  • rmdir
  • rmdir -r
  • dir /x (does not work on Windows 8.1)
  • find . -inum number_here -exec rm -i {} \;
  • shell scripts in Linux to delete files
  • rm "Movie ** 480p ** NEW.wmv"
  • rm -- 'file_name_here' (and variants)
  • chkdsk f: (This actually ended up with an error)
  • Using 7Zip

...and many other suggestions on different forums to similar problems, none of them work. My last option is using a hex editor and change the file name manually on disk but that may mess up the Master File Table. In addition, I could not locate what sector the MFT is.

One user on this thread solved this problem by connecting his drive to an Android system but my Android devices do not have USB connections and the original media center device cannot delete or rename the file either.

Any other suggestions?

1
  • I've no idea whether it does anything better than you've tried, or even whether it's even just a GUI on top of those commands, but I've used Move on Boot for awkward files before now - emcosoftware.com/move-on-boot
    – Tetsujin
    Sep 1, 2014 at 19:09

1 Answer 1

2

You can delete it using Linux:

rm ./Movie\ \*\*\ 480p\ \*\*\ NEW.wmv

Using \ you can escape the spaces and the asterisks, and adding ./ will make rm remove the file even if there's any - on the filename.

2
  • Depending on the shell you use, you might get away with typing rm ./Movie and then pressing <TAB> - autocomplete will fill in the rest, unless there is more than one file name starting with "Movie" in the directory Sep 1, 2014 at 19:21
  • When I use 'ls ./Movie\ **...' it does list the file; however, when I repeat the same command with 'ls' replaced by 'rm' it says "No such file or directory"... (I do have the backward slashes before the asterisks, they just don't show up here)
    – hekimgil
    Sep 1, 2014 at 19:30

Not the answer you're looking for? Browse other questions tagged .