File Properties shows wrong number of files - Path length issue?

By lvstephanie ·
We are in the process of a large archiving project that requires user's documents on their PCs to be stored on a server, and to perform the file-transfers, we use Robocopy. After the copy has been completed, we right-click on a base directory for that user, and check the file properties to ensure that the source and destinations have the same number / size of files. Unfortunately, I have been sent on a few wild-goose chases as I have tried to hunt down missing files.

A few times when there was a difference in the number of files that the Properties Window was showing, I'd navigate through the directory structure to get at the problem file only to find that it appears that all of the files were copied (sort of; I'll explain below). For example, when going to Properties on a buried folder, the source would say 6 files while on the destination it says only 5. If I then proceed to open up that folder, I see 6 files in both the source and destination. I did notice that one of the files on the destination would say 0 files on the Properties Window, if I right clicked on that file. Furthermore, I am unable to rename the file (either by two single-clicks on the name or by trying to right-click (the rename option doesn't appear in the context menu)) nor can I open the file. One other peculiarity that I've witnessed is that if I do a Ctrl+A to highlight all of the files in the folder and then try to open the Properties Window, I'll get a different number of files depending upon which file in the block I right click on. The problem file was located on the top of the folder list, so if I right-clicked on the bottom file in the list, the Properties will just list 1 file in the block. Right-clicking the next one above (the penultimate file in the list) shows 2, the one above that shows 3, etc. except for the top / problem file where it will list 0 files in the block.

I addition to being unable to rename or open the file, I've also found that I am unable to re-copy over that file using a normal drag-n-drop or Copy-Paste operation. This got me thinking... I know from the Robocopy reference that there is the /256 flag for the 256-character length limitation. I was wondering if all of these issues is because of this limitation (or some other limitation) in path-name length. I'm assuming that Robocopy is able to ignore this limitation, and so copying the file using Robocopy will indeed copy the file over. If that is the case, then is there a way to verify the number of files to show the true number instead of relying on the Properties Window?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

I you're running past the 256 character limit

by neilb@uk In reply to File Properties shows wro ...

You're going to get some strange stuff happening. Robocopy can cope with very long paths but Explorer can't and neither can any other GUI stuff. You'll have problems opening files with paths over 230 characters in any Office applications - especially Excel. So Explorer won't traverse any long paths to the end and that probably explains your different findings.

The only way around it is to shorten the paths unless you're willing to let Robocopy log what it's done.

Be aware that the /256 switch turns OFF the long path support.

Neil :)

Collapse -

Without knowing the OS on the Server ...

by OldER Mycroft In reply to File Properties shows wro ...

It'll be a bit awkward to answer.

However, I'm assuming that your view of these destination directories is in ICON MODE ? If this is the case, you should change the View to DETAILS mode - that way you'll see at a glance if a file has a zero bytes value.

Also if you left click on the top file in a list, then HOLDING DOWN Left Shift, left click on the bottom file in the list you'll highlight the entire list from top to bottom. While highlighted, right clicking anywhere in the list will allow you access to Properties for the entire highlighted content. :)

Related Discussions

Related Forums