REIT
asked on
File Length Query
Hi Guys
Is there a way of running a report or using a tool which will tell a user which files are about the exceed the Windows Maximum file length. Reason i'm asking is a user has just had an issue where she couldn't open or move a file due to its name being too big and they want to mitigate this before it happens again.
Is there a way of running a report or using a tool which will tell a user which files are about the exceed the Windows Maximum file length. Reason i'm asking is a user has just had an issue where she couldn't open or move a file due to its name being too big and they want to mitigate this before it happens again.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Word actually just gives you the word count in the bottom left of the screen and has since Word 2007, opposite the zoom controls. If you don't see it by default you may have turned off the feature somehow.
Here's how you can check the length in powershell for a file or path:
First, create a variable in powershell:
Then, find the length of your variable:
If you would like to script this to check all the files in a directory, try this:
First, create a variable in powershell:
$path = c:\windows\system32\drivers\etc\hosts
Then, find the length of your variable:
$path.length
If you would like to script this to check all the files in a directory, try this:
$files = gci c:\windows\system32\drivers\etc | select -ExpandProperty name
foreach($file in $files){
$filelength = $file.length
echo "$file, $filelength"
}
Brad,
I wasn't talking about the word count displayed in the status bar at the bottom: there is no way that I know of to make that display the character count.
To see the full word & character count, paste the path of the file into Word. Then, click on the "Review" tab and then click on the "Word Count" button to see the full Word Count statistics. This will include the number of characters with & without spaces. This is a screenshot from a full Word document, so the count is way over the path name limit, of course:
I wasn't talking about the word count displayed in the status bar at the bottom: there is no way that I know of to make that display the character count.
To see the full word & character count, paste the path of the file into Word. Then, click on the "Review" tab and then click on the "Word Count" button to see the full Word Count statistics. This will include the number of characters with & without spaces. This is a screenshot from a full Word document, so the count is way over the path name limit, of course:
ASKER
I will try your suggestions and let you know guys :), but due to the amount of files and folders the word document one wouldnt be the best solution.
In Word 2003 & earlier, I think you could find that Word Count item under the Tools menu.