Solved

file name too long

Posted on 2013-11-15
9
522 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
  • 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
 
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Correct way to use if / else command 3 57
Folder replication and file move 3 58
Internet Connection Util 8 69
file size 9 8
The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
This video discusses moving either the default database or any database to a new volume.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now