• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 535
  • Last Modified:

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.
0
yballan
Asked:
yballan
  • 3
  • 2
  • 2
  • +2
2 Solutions
 
duncanb7Commented:
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
[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

 
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
 
bevhostCommented:
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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now