Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 816
  • Last Modified:

compress or move a file with a long file name in Windows

Hello Experts

Hopefully an easy question.

How can I move or compress a folder which contains files with file names that exceed 255 characters in Windows.

I have restored a folder from an Ahsay backup and need to move it but I get the error message that it contains files where the file name is to long.

Any suggestions of a fix would be most appreciated.

Thanks

Purpleoak
0
purpleoak
Asked:
purpleoak
1 Solution
 
Phillip BurtonCommented:
I suggest it is not the filename that is too long, but the combination of path and filename.

I would create a share on a subfolder and connect to that share. That would reduce the path name.

Alternatively, reduce the path name - rename the parent folders.
0
 
purpleoakAuthor Commented:
correct it is a combination of the path and filename as the directory contains lots of sub folders, Is there not anyway around this? Other than the obvious of renaming files or removing folders
0
 
Phillip BurtonCommented:
I have given two options, which included

"I would create a share on a subfolder and connect to that share. That would reduce the path name."
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
EirmanCommented:
ROBOCOPY will accept UNC pathnames including UNC pathnames over 256 characters long.
http://ss64.com/nt/robocopy.html

There is a downloed link here
http://en.wikipedia.org/wiki/Robocopy
0
 
VB ITSSpecialist ConsultantCommented:
Use Robocopy (which is included with Windows 7) to move the file with the LFN.

Just use the below command in Command Prompt to move the folder:
robocopy.exe d:\long\folder\path d:\destination /mir /copy:dats /r:0 /w:0 /v
0
 
nobusCommented:
0
 
purpleoakAuthor Commented:
Exactly what we needed to use to move the data
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now