Max length for file and folder names
Discussion
I am doing some spring cleaning of alot of files I have prepared for clients and trying to name and store them logically. However, some of the names for files are quite long. Although I seem to be able to use long names on them, Windows XP Pro occasionally reports that these names are too long when I am trying to click/drag, paste, cut copy etc from one location to another.
What is the max length of file and is there an easy way of telling when I have reached it, rather than when I attempt to move it. I would have thought that in this day and age PCs would be able to handle long names with some ease!
Thanks, Bryan
What is the max length of file and is there an easy way of telling when I have reached it, rather than when I attempt to move it. I would have thought that in this day and age PCs would be able to handle long names with some ease!
Thanks, Bryan
The files I am moving are from just one folder to another, sometimes generating new subfolders. These are all on the C drive i.e. no CD ROMs involved - all on the same HDD and partition.I reckon that some of these file names are less than 100 characters long, but of course the file path can be very long indeed when folders are nested within one another.
TUS 373 said:
the file path can be very long indeed
Not sure how practical this is for you, but you could create shares half-way down your folder structure (e.g. share "d:\my business stuff\financial stuff\invoices for 2005" as "invoices", and then copy to the share.
You'd have to refer to the share from them on to get at your documents, though, so may not be the right solution for you.
I think there are separate limits for the length of the file name (256 chars I think) and the length of the full path to the file (1024 chars I think). I guess both of these limits may vary on different flavours of Windas. I don't know any way to find out of the path is valid other than to try to open it.
Weird this.
The particular file I was trying to move consistently refused to be moved into another folder. I kept getting the "too long or invalid file name" error. This is tosh as it is about 100 characters long and accepted elsewhere!
I used "Send to" ro send it to the top of "My Documents" and then dragged it down from folder to folder until I got to the destination folder, where once again it refused to be moved. Solution: I created a new folder and dragged it into there. Moved the other files I wanted into there, deleted the original (now empty) folder and then renamed this one. It was a long workaround but worked.
What I don't understand is why this file refused to behave the same as others do. very strange, and this is on a very clean and recent install of XP Pro???
The particular file I was trying to move consistently refused to be moved into another folder. I kept getting the "too long or invalid file name" error. This is tosh as it is about 100 characters long and accepted elsewhere!
I used "Send to" ro send it to the top of "My Documents" and then dragged it down from folder to folder until I got to the destination folder, where once again it refused to be moved. Solution: I created a new folder and dragged it into there. Moved the other files I wanted into there, deleted the original (now empty) folder and then renamed this one. It was a long workaround but worked.
What I don't understand is why this file refused to behave the same as others do. very strange, and this is on a very clean and recent install of XP Pro???
Since migrating to XP Pro I've had a few problems with Windows Explorer / Internet Explorer / the entire sodding operating system (they seem to be more or less the same thing these days) where it consistently crashes when I access certain specific directories. (Taking the whole desktop down with it of course. Usually it comes back, but not always.) So far I haven't been able to find what it is about the directories which triggers it, but path length may be a factor. It definitely seems to be associated with the names rather than the contents. Perhaps you're running into something similar.
Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff





Just a hunch, scandisk it.