topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Saturday December 14, 2024, 3:13 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: IDEA: Program to solve broken link issues becuase of file names and paths  (Read 3284 times)

datamess

  • Participant
  • Joined in 2019
  • *
  • default avatar
  • Posts: 2
    • View Profile
    • Donate to Member
The issues is that people  attach files into other programs - but the database uses file name and file path to find the file. If the user wants to batch edit file titles at a later time, ALL the links will be broken. Some programs do allow users to find the files in new folder paths - but still require that the name be same.

one solution is that a unique title be given to the file that is 128 alphanumeric or more (it cna be sequential aaa1 aaa2 aaa9 aaab1 etc vs. random asdas3 asdad34 dsfsdfwr3), and the current existing title SHIFTED  to another feild - something similar to description ro comments field. In that way, both the user knows the content by reading the new title feild, but at the same time, can batch edit title later without the links being broken.

The interface would be a drag drop zone where the files to be modified are dropped on (something like the renamer program https://www.den4b.com/products/renamer )
OR else theprogram can monitor certain folder and automatically do this shift & renaming as files are entered in the program.

probably cross platform is best. and portable.
------------------------------------------------------------------

A companion app to this to fix FILE PATHS being broken is a differnt method of storing files.

So the files would be in either totally flat or relatively flat folder (meaning not too deeply nested) that are VERY broad catergoies. Then Folder are created that represent the deeply nested categories.
the PROGRAM would simply  have 2 panes
in pane one its the flat list
in pane 2 the deep nested things
in dragging and dropping from pane 1 to 2 - 2 things happen:
1) links are created under the deeply nested folders and 2) tags that represent the immediate parent are attached in the tag feild of the file

BUT when you drag & drop links from the pane 2 onto a program where the attachments are -
then the program auto converts and send the link of the original file path (not the symbolic link)

This program might help with hard links: http://schinagl.priv...kshellextension.html

so in that way , it reduces the file paths breaking.

This one probably HAS to be cross os...becuase I know that shortcuts dont work across os.

======================

Finally the last companion app to this might be a batch file attribute modifier (meaning the tag feilds, comment feilds, etc.) becuase more renamin program only batch edit the title feild.

Kind of like the renamer program mentioned above  but for meta data
------------------------------------

Unless theres an easier way that already exists.

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,629
    • View Profile
    • Donate to Member
I'll start with a question: Who's problem are you solving here?

And a proposed design of how to avoid this:
  • The application should provide a configurable base-path to a file-upload directory.
  • When uploading a file it should be given a unique name as it is stored in a (nested) directory structure from the base-path (I think it should not be stored as a blob in the database). The directories should be nested to avoid thousands of files in a single directory.
  • The database should store this path and filename, relative from the base-path, so for retrieval they can be appended and downloaded.
  • The database should store the name/title of the file, initially set to the original filename, without any path information, and probably also include date/time and size info. The extension of the file should remain as initially uploaded.