3

I need to access a file on a network drive, but the file has a : in its name. This makes Windows rather unhappy. I cannot rename the file through any method on Windows, so I tried a Mac computer. It sees the file and uses a / instead of the :, but it also throws errors when trying to rename the file. I booted up an Ubuntu live CD to check, but Ubuntu doesn't display the file at all (even with hidden files/folders shown).

I'm at a loss for what to do. I cannot rename, delete, or move the file, so it's stuck there. What can I do to forcefully rename the file? (Deletion is also acceptable, but I'd MUCH prefer saving the data if at all possible.)

This was attempted on Windows 8, OS X 10.8.5, and Ubuntu 13.04.

An Dorfer
  • 1,178
  • 2
  • 8
  • 14
vaindil
  • 1,229
  • 12
  • 22
  • 45
  • 1
    Do you try moving it in OS X and Ubuntu by surrounding the name with single quotes? – Peon Sep 16 '13 at 19:11
  • @Peon I do not have SSH access to the remote location, so I cannot run command line stuff from bash. I tried all of the commands in Windows using `pushd`, but the only equivalent (that I know of) is `ssh` in Bash. – vaindil Sep 16 '13 at 19:14
  • Try opening a command prompt and renaming it using it's 8.3 compliant name. – EBGreen Sep 16 '13 at 19:17
  • @EBGreen I'm not sure how to get it. I used `dir /x`, which is supposed to do it, but that returned the exact same results as `dir`. – vaindil Sep 16 '13 at 19:21
  • Is the file name less than 8 characters? You can also try using powershell instead of cmd. Do a dir that will return only that file and pipe it to a command to rename it. – EBGreen Sep 17 '13 at 15:12
  • @EBGreen The file name is longer than 8 characters. I hadn't thought of PowerShell; I'll try that when I get back to the computer. – vaindil Sep 17 '13 at 15:15
  • What kind of errors are you seeing from the Windows GUI and command-line? – User5910 Oct 19 '13 at 04:50
  • Have you already ran chkdsk? Warning: this may delete the file. – Jan Doggen Jul 29 '14 at 15:17
  • Did you try using the unicode path? Like suggested here http://superuser.com/questions/31587/how-to-force-windows-to-rename-a-file-with-a-special-character (Hint: I found this with https://www.google.com/search?q=rename+windows+file+illegal+character) – Jan Doggen Jul 29 '14 at 15:19
  • Can you show the exact filename as shown by Mac, Windows and Linux? It intrigues me that Mac insists on using a `/` instead of the `:`. – arielnmz Jul 29 '14 at 15:24

1 Answers1

1

Have you tried renaming with wildcard matching? For instance, if the file is bad:name.bin, try ren bad*.bin ok.bin.

User5910
  • 536
  • 1
  • 4
  • 19