How to open JPEG file whose name or extension is too long?

August 24, 2013 at 10:23:37
Specs: Windows 7
I have too many characters in the Saved name of a JPEG file. How can I shorten the name so it can be opened?

See More: How to open JPEG file whose name or extension is too long?

Report •

#1
August 24, 2013 at 11:06:23
Rename the file so that the name is short enough to open.

You've been helped by a 15 year old.


Report •

#2
August 24, 2013 at 15:05:24
And if there is some reason you can't rename it, tell us more.

Such as how long the name is, how you know it is too long,
which filesystem is used by the partition that the file is on, etc.

Windows' limit of 260 characters is the length of the entire
path, not just the filename and extension.

-- Jeff, in Minneapolis

message edited by Jeff Root


Report •

#3
August 24, 2013 at 15:21:16
Usually you just right click and then Rename from the drop down. The file should still open normally.

Always pop back and let us know the outcome - thanks


Report •

Related Solutions

#4
August 24, 2013 at 19:29:26
Thanks, Jeff.

Usually, of course, right-clicking the mouse provides the option of Renaming a file. However, the Rename option is not included in the options when right-clicking this file.
The Rename option remains available for all my other files.

I do indeed have a very long file name, and it probably does exceed the 260 character limit. But when I saved the file originally with Windows XP, I was not warned that the long name would hamper my ability to open the file later. There are warnings for improperly doing other things, but apparently not this one.

I only mention XP because now I am using Windows 7, which may or may not have anything to do with this problem (I certainly doubt it).

In any event, this is pretty perplexing. Any more thoughts?


Report •

#5
August 25, 2013 at 02:09:32
I think you jumped the gun when you marked my post as
the best answer. It may be the best response so far, but
it isn't an answer to your problem.

The default is for a single click on a filename to select it.
If you wait a second, then click again, it should immediately
go into "rename" mode.

Aternatively, instead of clicking a second time, you can hit
the F2 key to go into "rename" mode.

If neither of those work, lemme know, and I bet I can come
up with something else to try.

-- Jeff, in Minneapolis


Report •

#6
August 25, 2013 at 09:48:30
A live Linux CD would fix it. You can about do anything with that and Windows will not get in the way. The other possibility is to rename it using the command prompt (if it will let you).

Always pop back and let us know the outcome - thanks


Report •

#7
August 25, 2013 at 12:05:00
Jeff, your F2 suggestion works on every file except my problem file. I get no response from F2 on my problem file.

When I right-click, the Options are:

Open, Set as desktop background, edit, print, review, rotate clockwise,
rotate counter clockwise, open with, pin to start menu, send to

When I click "Open" I get a small screen that states, "the file name or extension is too long." In the upper left part of the screen is "Explore.EXE." The lower right of the screen is an "OK" button.

When I try the other Options available to me, I get No Response or the same small screen saying the name's too long. An exception is the "Review" Option which prompts the following message on a full screen:
Windows Photo Reviewer cannot open this picture because either Photo
does not support this format, or you don't have the latest updates to
Photo Reviewer.
I'll bet anything all this has nothing to do with an Extension problem. The Saved Name is simply too long. But to not have some way to shorten that name defies all logic (at least 'logic' as I think of it).

Jeff, I hope will give this problem some more thought?


Report •

#8
August 25, 2013 at 13:48:41
Re my #6.

Sorry I didn't make it clear that the two suggestions were to enable you to shorten the file name. I believe that the Live Linux CD (which just runs between RAM and the CD) would definitely work, maybe the command prompt idea - not so sure about that.

Always pop back and let us know the outcome - thanks

message edited by Derek


Report •

#9
August 25, 2013 at 17:22:14
Sorry, Derek, your message got by me before. Or maybe I just didn't understand it.

What's a "Linux CD" and what's a "command prompt?" How do I access and use these two things?


Report •

#10
August 25, 2013 at 17:46:33
Linux Live CD's are produced using your burner software from a download. You start the computer with the CD in the drive and (if the CD drive is ahead of the hard disk) then you Linux will run direct from the CD only without affecting your Windows installation in any way. However it will give you access to any file on your hard disk so you could then find it and shorten the name - it's usually "Windows" that is stopping you.

I'm less confident about the command prompt idea because Windows is still running. To get there you type cmd.exe in search. A black screen with white writing then pops up and you type in the commands to rename the file. If you let me know exactly where the file resides and it's long name then I can give you the necessary information. We can probably work in "truncated 8 bit names", which could help our chances of renaming it - more later. This might be the easiest thing to try first.

Always pop back and let us know the outcome - thanks


Report •

#11
August 26, 2013 at 02:40:19
Changing the name or copying the file to one with a new
name at the command prompt is what I came up with, too.
Also the 8.3 short filename. You should be able to use the
short name for the file and just ignore the long one. Short
names are eight characters long with a three-character
extension, like this:

VERYLO~1.PNG VeryLongFilenameThatSomebodyThoughtWasAGoo

All files with names longer than 8.3 have a short 8.3 version.

You don't need to know the whole long name in order for
Derek or me to help you -- just the first six letters of the
filename and the first three letters of the extension, as in
the example above.

It is also helpful to know the full path to the file. That is, the
drive letter and the names of the heirarchy of folders it is in,
if any.

I'd go with the Linux solution myself, since I already have
Ubuntu Linux installed on this computer. :) I got my Ubuntu
disk from the Computer Science help desk at the University
of Minnesota, so didn't have to download it or "burn" it.

-- Jeff, in Minneapolis


Report •

#12
August 26, 2013 at 02:53:42
My guess is that the filename (including extension) is
255 characters long, which is the limit for NTFS drives,
and adding the path onto it makes it longer than the
Windows limit of 260 characters for the full path
including filename.

-- Jeff, in Minneapolis


Report •

#13
August 26, 2013 at 08:37:23
Yep Jeff, agreed. You shouldn't need to quote the whole long name in order for
us to help you.

Always pop back and let us know the outcome - thanks


Report •

#14
August 26, 2013 at 09:39:41
Is this JPEG file on a CDR? If so, copy and paste to your desktop. Then right click on it and choose properties. If read only is ticked, untick it and you should then be able to change the name.

Even if the file is on your hard drive the properties may still be marked as read only.


Report •

#15
August 27, 2013 at 10:50:51
My answer to OtheHill: I am unable to copy my problem file. So even if I was familiar with a "CDR" (which I'm not). I wouldn't be able to copy it there anyway.

Thanks again to Derek and Jeff: Since I have been punished many times in the past for wandering into unknown cyberspaces, I hesitate to try and download Linux directly to my Burner. I can order a Linux CD itself for about $7.00, but will hold off until I see if the "Command Prompt" idea can work. Incidentally, there's all kinds of price ranges ($7 to hundreds of dollars) for the Linux CD, etc. Assume the $7 product is all I need?

Anyway, I searched and found the black screen after Searching for "cmd.exe." I'm not sure what to type next, nor what I will do after I type something. So, here goes:

My file name is:
Anderson & Plant_CheriGrahamPlantGradLPNSchool_George III Plant, son of CheriFriend(Newland), MikePlant,RoyAnderson,CheriPlant_GeorgePlantSr,GeorgePlantJr_OscarWendahl_1912EstesChicago_cic1974

The path:
1.5t/Backup/My Docs/My Pictures/FamilyHX_Anderson/FamilyMembers

Since all my other JPEG images have the ".jpg" extension, I assume so does my problem file. However, since I can't access the "Properties" of my problem file, I can't guarantee that it has the same extension.

I have no idea how many of these problem files I might have, I can identify at least 5 of them at this point, but I'm sure others are ready to ruin my day when I need a particular file that I know I have somewhere.

Anyway, I am continuing to ask for your help. Thanks.


Report •

#16
August 27, 2013 at 13:40:39
Don't buy a "Linux CD" because you certainly don't want or need to install Linux. You could end up overwriting Windows. The idea with a "Live Linux CD" is that it only runs from the CD drive and does NOT install itself.

Is this path on the hard drive (as I assumed) or on a CD or DVD, as OtheHill asked?
If it is on a CD or DVD the whole situation becomes different.

If it is on the hard disk we need to be sure where the path actually starts from. What are you doing in order to get this path info?

Always pop back and let us know the outcome - thanks


Report •

#17
August 27, 2013 at 16:53:57
I'm reading what's across the top of my screen when I'm ready to click the file icon. And, yes, this path is on the hard drive.

Report •

#18
August 27, 2013 at 18:41:58
Wish I could be there to see what you are seeing and where LOL. What you gave was not the full path. I'm looking for the start point which must be before the "1.5t" part. It must be somewhere off the hard drive and there are likely to be other folders involved too. Maybe if you temporarily set to show hidden files and folders it will help - then perhaps you can track it down from "Computer".

This could be a little tricky for you if you are not into Files/Folders in a big way. Using a Search for most of the file name might find it and give you the full path if you right click and select Properties (assuming it even lets you do that).

Without a meaningful path we are stuck. From the path given there is a strong possibility this is on some sort of backup partition - in which case we would be treading where angels fear to do anything at all with it.

Silly question at this late stage but why do you want to open it - do you know what it is?

Always pop back and let us know the outcome - thanks

message edited by Derek


Report •

#19
August 27, 2013 at 19:35:45
Your reply helped me find what I now believe is the complete path:

C:/Users/GeorgePlant/Desktop/1.5t/Backup/My Docs/My Pictures/FamilyHX_Anderson/FamilyMembers

The actual 'slashmarks' (as you must know) go in the other direction than what I've typed.

I was exploring some family history a few years ago, and I was Archiving old photographs by scanning them, then saving them to my computer. Savingimages got pretty challenging identifying people, places &dates. Hence the long file names. We all know that ignorance is Hell not Bliss.

Anyway, Derek, the photographs may no longer be available, though I certainly hope so.

Would appreciate more input if you have it. If not, I appreciate your help (along with Jeff's).


Report •

#20
August 28, 2013 at 07:47:46
OK, that's nice and clear now. It was only the fact that Backup appeared in that path which worried me a tad.

It would be easier if you let me know one more important piece of information before we go ahead. From Windows will it let you open the folder "FamilyMembers"?
We can proceed whatever your answer but I want to make it as easy as possible for you by moving down the file structure as far as possible before we input the command. This will make the command shorter (thus avoiding typos which are not allowed).

Always pop back and let us know the outcome - thanks


Report •

#21
August 28, 2013 at 12:00:55
Click on Computer> tools> folder options> view. Check to display the full path in the title bar. Uncheck Hide extensions for known file types. Click Apply and OK.

This will show the file extension, or lack of it.

If you right click on the file in question you should then see a context menu that has many choices. Among those choices should be Copy, Paste, Rename. Do you see those?


Report •

#22
August 28, 2013 at 13:30:57
OtheHill, when I click on Computer, nowhere can I find Tools, Folder Options, View.
Sorry, but you've lost me.

Report •

#23
August 28, 2013 at 13:32:05
Derek, yes, I have many other files in my Family Members folder.

Report •

#24
August 28, 2013 at 13:51:20
George,

Shortly after I posted I realized that I was wrong about needing
to have the first three characters of the filename extension. Just
the first six characters of the filenane, which you've provided, will
be all you need.

I have complete confidence that you will be able to recover all of
your photos. Hang in there. I will. I think the others here will, too.

If you haven't already learned since saving those photos a long
time ago, someone who knows more about it than I do should
explain to you how to store descriptive information with your photos
so that you don't have to try to fit it all into the filename. There are
lots of options available, and some of them are already built into
Windows.

I think the first thing you should do is to try to get as much of the
long filenames as possible, so you won't lose the information in
them by renaming them. Derek will probably guide you through
that if you haven't done it already. Otherwiise, I'll be glad to.

-- Jeff, in Minneapolis


Report •

#25
August 28, 2013 at 14:00:40
OtheHill,

The selection in Tools - Folder Options - View - Advanced settings
that you refer to says:

" Display the full path in the titlebar (Classic theme only) "

It is unlikely that he's using a classic theme. There are other
things he can do to see the full path if he currently doesn't see it.
I suggest that you find out first what he currently can see.

Since he has apparently provided the full path, I think we're ok.

-- Jeff, in Minneapolis

message edited by Jeff Root


Report •

#26
August 28, 2013 at 14:08:08
Sorry had to go AWOL. I'll be back shortly with commands....

Always pop back and let us know the outcome - thanks


Report •

#27
August 28, 2013 at 14:43:08
Open up cmd.exe
In Command prompt we call folders "directories" (historic). Upper and lower case is unimportant, everything else must be input exactly.

Command Prompt should display C:\Users\GeorgePlant>

So "GeorgePlant" is the folder we are actually inside. Each of the next commands will change directory (cd) and move you further down the path you gave. Hit Enter key after each command. The next folder you are inside will display after each command, so you can check each step as you go:

cd Desktop

cd 1.5t

cd Backup

cd My Docs

cd My Pictures

cd FamilyHX_Anderson

cd FamilyMembers

If you get an error at any stage, type it again to see if it was a typo.

If the full path is now displayed we can then tackle the long file. Before that type dir/p and hit Enter which will show all the files in the folder, screen at a time. If there are a lot it will ask you to hit any key to show the next screen full (Enter will do).

If there are a number of files which start with Anderson then we are in for a bit of fun to find out which one we should be dealing with. If there is just one then this is the command to enter:

ren Anders~1.jpg New001.jpg

(Note: Just two spaces, one after ren and one after...jpg).

If this shakes out the dodgy file will be renamed to New001.jpg

If there are stacks then let me know how many. We might have to rename all of them.

Note that I could have given a single long command to do all this but by taking it step by step it should allow us to see where we are at each stage and minimise the chance of typos creeping in. It obviously rests with the assumption that the information you gave is "exactly" right.

Good luck

Always pop back and let us know the outcome - thanks

message edited by Derek


Report •

#28
August 28, 2013 at 16:15:13
Excellent help, Derek.

I'll add a few remarks about using the command prompt.

The window cannot be widened, but it can be dragged taller
so you can see more lines.

If many files are in a directory, a " dir " or " dir /p " command
could have many pages. Hit Ctrl-C to immediately stop the
directory listing at any time.

Pressing the up-arrow key goes back through the commands
you have typed, so you can repeat a command without having
to re-type it. You can edit those commands as needed.

-- Jeff, in Minneapolis


Report •

#29
August 28, 2013 at 16:40:15
Jeff

I've found that dir/p usually stops neatly at a full screen but thanks for the extra half mile on this whatever. Every little helps as they say.

Always pop back and let us know the outcome - thanks


Report •

#30
August 28, 2013 at 16:49:43
Yes, dir /p does stop at a full screen, but when he comes to
the page containing the file of interest, he'll want to stop there,
and can do so by hitting Ctrl-C.

But it also works when the files are whizzing up the screen
like movie credits on TV.

-- Jeff, in Minneapolis


Report •

#31
August 28, 2013 at 17:18:26
OK thx - I get your drift.

Always pop back and let us know the outcome - thanks


Report •

#32
August 28, 2013 at 17:42:27
I'll give everything a try in the morning. Thanks one and all, and I'll let you know what happens.

Report •

#33
August 28, 2013 at 17:48:15
One other minor point. Jpeg and jpg are pretty well exchangeable but jpg is mostly used. If the file extension was jpeg rather than jpg then add the missing "e" in the first part of the final command or it is unlikely to work.

Always pop back and let us know the outcome - thanks


Report •

#34
August 28, 2013 at 18:30:45
We forgot an important command. Use " cd .. " to exit the current
directory and go back to the directory one level up.


One of the extensions should work: .jpg or .jpe or .jpeg

If not, wildcards will probably do the trick.

The asterisk wildcard can be used in place of any number of
characters: " dir geor*.jp* " will list all files whose filenames
begin with the letters " geor " and have an extension which
begins with the letters " jp ".

-- Jeff, in Minneapolis


Report •

#35
August 28, 2013 at 19:35:29
Yeah, I guess there's stacks we could add. See how the poster gets on with what he has at #27 and if necessary various other tricks can be employed.

Always pop back and let us know the outcome - thanks


Report •

#36
August 28, 2013 at 20:21:35
Another option would be to boot to the Windows Recovery Environment (Tap F8 at startup and select Repair Your Computer), and then open a command prompt and follow the steps in #27 (but be sure to enter the commands C: and then cd Users and finally cd GeorgePlant before doing the commands in #27), which would allow you to attempt to rename the file without the Windows environment running as an alternative to a Linux CD.

You've been helped by a 15 year old.


Report •

#37
August 29, 2013 at 06:46:55
I've followed the directives of #27, and I can identify the problem file on the black screen. Incidentally, the extension is in fact .jpg

The bad news is that there are almost 300 files starting with Anderson, and I am not (at least at this point) willing to risk having to rename all of them.

Also much of the discussion after #27 is over my head, so I've held off doing anything further until I followed doing #27.

That said, now what?


Report •

#38
August 29, 2013 at 07:33:00
as another thought, something you could try.

open a notepad and paste this in the white space
rename %1 newfile.jpg
then "save as" it in the folder with the picture in it as change.bat with "all files"(In the drop down box below it.). Then drag and drop the file onto the change.bat.

::mike


Report •

#39
August 29, 2013 at 08:47:18
I totally agree with you about not wishing to tackle 300 files - it would be crazy. Unfortunately it is near impossible to identify the particular file using command prompt - unless anyone else can think of some way. You could try it using full file names but my guess is that you will end up back with "access denied". The hope was that using short file names would have circumvented this.

My view is to use a Linux Live CD because you will then have a fighting chance of identifying the particular file that has problems. It is not terribly difficult to do this and we can do a step-by-step if you wish. There are only two points where folk can stumble:

1. You have to burn the Live Linux CD onto the disk using "burn an image" feature (included with most burning software) - you don't just put the download onto a CD. If push comes to shove you can temporarily install a small freebie to do this.

2. When using the CD you have to ensure that the first boot drive is your CD/DVD drive. It might be already but as often as not it is the main C drive. You therefore have to go into BIOS to change the boot order.

So, that's about all I can suggest - let us know if you want to go that way.

Always pop back and let us know the outcome - thanks

message edited by Derek


Report •

#40
August 29, 2013 at 12:19:29
I believe Derek meant "It is ***NOT*** terribly difficult to do this".

There is no doubt that you can recover your photos. It will just
take more effort than we thought when there were only a few.

The $7 Linux CD could be a good alternative to downloading
and burning the CD yourself. As I said, I obtained my Ubuntu
Linux disk for free by walking over to the university computing
department. I have 5 disks. They can be used as live CD as
Derek suggests. If it might be faster, I could mail one to you.

October 2007 - 32-bit
April 2009 - 64-bit
October 2009 - 32-bit
October 2010 - 64-bit
April 2011 - 64-bit

I'm most willing to part with either (or both) the oldest and the
newest. The newest version has a user interface similar to
that of Windows 8. They probably all work fine. If you want
one or two of these, e-mail me at jroot at freemars dot org.

-- Jeff, in Minneapolis


Report •

#41
August 29, 2013 at 12:44:39
At this point I'm going to try and get my hands on the photos that I originally scanned. If I can, then the problem(s) are solved.

Thank you for your efforts, everyone. Particular thanks to you,Jeff, for your willingness to send me one of your Linux CDs.

This has been a rewarding experience even though the 'problem' hasn't been solved. Thanks again.


Report •

#42
August 29, 2013 at 13:33:07
Jeff
Ooops, thanks for pointing out my most unfortunate typo - have corrected.

GeorgeP
Sounds like a good plan - hope it works out for you.

Always pop back and let us know the outcome - thanks


Report •

#43
November 20, 2016 at 19:15:44
I have another idea that might fix this problem.

The problem appears to be that the full path, including
filename, of some of the files in a folder containing many
files are longer than 260 characters, making them too
long for Windows to access or rename. How did they
get that way? Two possibilities: Either they were saved
by a program which is not limited by the Windows limit,
or they were saved into a folder that had a short path,
and the path was later lengthened.

The solution might be to shorten the path. And there are
two possible ways to do so.

Either rename each of the folders in the path with shorter
names, or copy the folder containing the problem files to
a location closer to the root.

Then it should be possible to shorten the long filenames.

-- Jeff, in Minneapolis


Report •

#44
November 20, 2016 at 21:50:16
As I read through all, I was about to add that copying the entire folder with the files in it directly to the root C: drive might shorten all file names enough to make them accessible. I now see that Jeff just basically added this at the end. It does have the advantage that if it works it will save a LOT of hassle with the minimum of work.

You have to be a little bit crazy to keep you from going insane.


Report •

#45
November 22, 2016 at 06:28:37
Not sure how this will work on a local machine, but where I work we have this issue constantly when saving CAD files. The solution I tend to use is to map a drive letter to the folder that is too long.

for example if "C:\users\AWTL\.................................\Files\" was the offending folder, then id map a drive to that folder and it immediately shortens the path to something like

"G:\Files"

it happens so often that iv written some VBA that allows you to map a folder to an available drive letter, happy to send if you PM your email address.

as I said though, iv never tested this on a local machine, always have used a networked environment so not sure how relevant/useful this would be. i'll try it at home perhaps.


Report •

#46
November 22, 2016 at 07:03:12
Not so sure our poster will still be watching as this post is over 2 years old.

Always pop back and let us know the outcome - thanks


Report •

#47
November 22, 2016 at 07:17:44
Doh didn't realize that, just saw the thread on the top of one of the forums and decided to reply. Thanks,

Report •

#48
November 22, 2016 at 08:57:37
I don't understand how this thread was even open at this time. That said, the original poster doesn't seem to be responding to the recent posts. I would say this is fruitless at this point.

For anyone researching similar issues, I found this problem popping up when archiving large folders with multiple layers of sub-folders to CDR or DVDR. Both those media are read only but With each layer of folders the string gets longer.

Windows 10 does allow a user to change the 255/260 character length. Google for it as there are many hits.

https://mspoweruser.com/ntfs-260-ch...


Report •

Ask Question