0

I have copied some data from my Linux machine to my external hard disk. When I want to read some files on my Windows machine, I can't open it. I get the below error

The specified path does not exist

On the other hand I can't rename or copy the same file, with error

The file name you specified is not valid or too long

I have tried to use rename function in command prompt (with and without quotation marks):

rename "Long Name of The File.pdf" "short.pdf"

but I get this error (I don't know why?):

The syntax of the command is incorrect

Can you please help me?

2
  • 1
    How long is it? When dealing with files in folders, you can rename the parent folders to access the files and rename them.
    – Alex H
    Commented Sep 7, 2015 at 9:49
  • copy the exact file name here, don't type it
    – phuclv
    Commented Sep 7, 2015 at 9:52

2 Answers 2

2

Without quotation marks or escape characters it won't work, because how can cmd knows which belongs to the original file name and which belongs to the new name? Will ren old name new name renames a file named old to name new name or a file named old name new to name or...?

Typing by hand might not work either because there may be some hidden or special characters in the file name which you can't type on keyboard. Better type a few characters of the file name and press Tab ↹ for auto-correct until the correct name appears.

If it doesn't work, probably because your path is too long. Rename the folders before the file to make it shorter, or map the containing folder to a drive using subst or disk manager mount. For more ways read this and this.

You can also try renaming with the short name of the file if it's available. Run dir /x to see and check for the short name of the file, then run ren shortn.ame new.name

If it still doesn't work, there may be some special characters in the file name that are forbidden in Windows like /\:*"?<>|. It might be easier to just boot to Linux and rename it.

Further reading:

6
  • I alway use tab for autocorrect. It seems that file name is wrong. It is not to long, since I can access other files with longer names (together with Folder names). I can't also see special characters forbidden by windows (space and -). Commented Sep 7, 2015 at 10:08
  • I also see that in Properties/Security there are no any relevant information. Commented Sep 7, 2015 at 10:13
  • You can't simply see all the characters as not all is viewable. And space and - is not forbidden by Windows but things like :?*\/... are not allowed
    – phuclv
    Commented Sep 7, 2015 at 10:35
  • Yes. I realized that some special characters are included. The thing that I do is to change name in linux and copy it. However I will try to change everything in windows, but none of proposed methods are not working. Commented Sep 7, 2015 at 11:54
  • It's almost impossible to do it in Windows. The easiest way is to use a Linux boot disk and rename it. Did you check the links above? If it still give errors you must give more detail
    – phuclv
    Commented Sep 7, 2015 at 12:20
0

Data is damaged . Because buffer data not wrote in disk. I think some data has been lost.

Now the best way is you scanning and fixing external hard disk with windows tools.

enter image description here

windows error checker can fix some errors.

You must log in to answer this question.

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