DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

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

questorfla

  • Fighting Slime all the Time
  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
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

  • Fighting Slime all the Time
  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
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

  • 0 - 60 ... then back to 0 again!
  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 4,642
    • Participated in NANY Challenge Three Times
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".

Use attachthumb=# to show an attached image as an expandable thumbnail, or attach=# to show full size. (With Brackets)

TaoPhoenix

  • 0 - 60 ... then back to 0 again!
  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 4,642
    • Participated in NANY Challenge Three Times
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"!
;)
Use attachthumb=# to show an attached image as an expandable thumbnail, or attach=# to show full size. (With Brackets)

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
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:

  1. Can't resize the form.
  2. Can't sort the columns.
  3. 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

  • Fighting Slime all the Time
  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
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. 

Original address: https://www.donationcoder.com/forum/index.php?topic=39265.0