Solved

file name too long

Posted on 2013-11-15
9
528 Views
Last Modified: 2013-11-15
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
Comment
Question by:yballan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 13

Accepted Solution

by:
duncanb7 earned 250 total points
ID: 39652071
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
 
LVL 9

Expert Comment

by:guswebb
ID: 39652091
what is the full path of the folder?
0
 

Author Comment

by:yballan
ID: 39652166
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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 13

Expert Comment

by:duncanb7
ID: 39652218
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
 
LVL 19

Assisted Solution

by:bevhost
bevhost earned 250 total points
ID: 39652307
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
 
LVL 19

Expert Comment

by:bevhost
ID: 39652311
Renaming any long folder names to have just a single character will also help.
You have just 255 characters limit in total.
0
 

Author Closing Comment

by:yballan
ID: 39652316
thank you, by using SUBST and del /F *.*, I was finally able to get those files removed!!
0
 
LVL 13

Expert Comment

by:duncanb7
ID: 39652325
thanks and good to hear you solved  it

Have a nice day and a good weekend
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 39652629
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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using dates in 'DOS' batch files has always been tricky as it has no built in ways of extracting date information.  There are many tricks using string manipulation to pull out parts of the %date% variable or output of the date /t command but these r…
VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question