file name too long

Dear Experts,

I have just restored a mailbox from an old backup, and some of the messages downloaded have names too long for our file system.
I have tried to rename them, but it comes back saying that that file name is not found.
(I am using ren command from DOS command prompt)
I have shortened the folder name that contains these messages to one character, there is nothing else I can shave off.
Isn't there a DOS command that forces to delete everything in the folder, such as del *.*?
(this also comes back that file name is too long.)
I think the key is to rename the files, but I have had no success.
Please advise.
yballanAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
duncanb7Connect With a Mentor Commented:
Isn't there a DOS command that forces to delete everything in the folder, such as del *.*?

Do you try  this ?
del /F *.*

Or

del /F /S *.* (delete the directory's sub directory but take care of it )

Duncan
0
 
guswebbCommented:
what is the full path of the folder?
0
 
yballanAuthor Commented:
Dear Duncan, thank you for a quick response.  I did try those commands, but the same error message.

Dear guswebb,
The full path of the folder is c:\I and c:\DI.
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
duncanb7Commented:
Could you capture or send us the error response on command shell
so that we can fully understand your question ?

Please show us every command you input on the command shell
0
 
bevhostConnect With a Mentor Commented:
There is a dos command called SUBST which allows you to assign a drive letter to some folder
eg
SUBST K: C:\foo\bar\some\long\path\

Now you can access further down the tree from K:
0
 
bevhostCommented:
Renaming any long folder names to have just a single character will also help.
You have just 255 characters limit in total.
0
 
yballanAuthor Commented:
thank you, by using SUBST and del /F *.*, I was finally able to get those files removed!!
0
 
duncanb7Commented:
thanks and good to hear you solved  it

Have a nice day and a good weekend
0
 
Steve KnightIT ConsultancyCommented:
another good one for this is to use robocopy aswell,

robocopy c:\empty c:\brokendir /purge

the files in c:\brokendir are then removed as c:\empty has nothing in it.

steve
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.