topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Monday March 18, 2024, 9:05 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: SOLVED: Program to show total character count in path for filename in a directory list  (Read 5391 times)

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
I have seen this somewhere so i know it exists.  A directory display that lists all the files in a given directory showing the total length of the path to display the file.  I believe I have an issue where the total path length is exceeding the allotted variable size to store the file for download.  The variable is set to 255 and I am pretty sure the path to reach the file from root c: is over 190 characters (in some cases) including all directory names.  A few people are getting very creative about names and I have seen Word docs of over 60-70 characters long.  A directory display showing this would allow me to see if there really is a problem and if so make it very clear to the people causing it.

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Duh.  cnt believe i found it so fast.  In case anyone else needs this.  Download from HERE

Thanks.  If I had not I asked I would not have found.  Murphy's Law  ;)

TaoPhoenix

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 4,642
    • View Profile
    • Donate to Member
I can believe it - Wikipedia is up there. If you just save a wiki page, you get something like "Coconuts and the calorie count of their juice - Wikipedia, the free encyclopedia". If you have a file system that already has a lot of characters going, I can see how it bumps over 255. I save my flash-notes in batches, and I've run into it a few times that "X is too long to process".


TaoPhoenix

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 4,642
    • View Profile
    • Donate to Member
Duh.  cnt believe i found it so fast.  In case anyone else needs this.  Download from HERE

Thanks.  If I had not I asked I would not have found.  Murphy's Law  ;)

In the words of my House MD marathon, "your bad question led to your good answer"!
;)

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
There's an older thread on this very thing: https://www.donationcoder.com/forum/index.php?topic=17371.0

Duh.  cnt believe i found it so fast.  In case anyone else needs this.  Download from HERE

Nice find.  However, I've noticed some limitations:

  • Can't resize the form.
  • Can't sort the columns.
  • The CSV output breaks if there are commas in the filepaths.

The Name Knife tool I wrote in the thread above currently considers only filenames (by request) but it wouldn't take much to add options to handle full paths, etc.  I might just go ahead and do that and release it on my site since it seems others would get some use from it.

I'll move this thread to the Finished section.


questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Thanks Skwire.  If you post a link to name knife after it can do full paths, this program is a little tedious to use.  No instructions at all.  It does not install, just runs which is OK by me. But i wisj i had known it was saving the file to its own folder and that I could change it.  Most of the things I SHOULD have just assumed to be so but i hardly ever "Assume" anymore.

The ability to do some automatic trimming with set options like removing spaces, dashes, underlines, etc would be nice too.