• 14
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

Sorry if this has been asked before. I tried a search but...

We would like to make a central collection of symlinks from a number of disparate folders and subdirs and which use unnormalised file naming conventions.

I need some mechanism to create a symlink of all files and dirs within a given directory. There are hundreds of thousands of files and each will need to be renamed to conform to naming standards in use. I can then do this for each of the 20 some file locations

What is my best mechanism for doing so?

I am a mostly clueless noob, so please keep this in mind :D

If you need more info, please do not hesitate to ask in the comments.

Thanks!

      • 1
    • I find the phrasing of the question confusing, Do you need to create one symlink for each of the hundreds of thousand of files so you can rename each one and still find it by the old name? Or one symlink per each of the 20-something containing directories so you can change the paths?? Why do you think symlinks are the best solution to your problem?
    • Sorry - yes, I was thinking I would need one link to each file, which would point to the old oddly named fie and make it accessible under a normalised directory and naming scheme. I have to keep the originals as they are because reasons. Is there a simpler way to achieve this?
      • 1
    • You make it sound like there are no patterns which could be used to map "old oddly" names to "normalised" names. If that is so you would need to create the map filepath/name by filepath/name, then script through it to create links. So unless you could identify patterns you are in for a lot of work. Breaking the dependency (in applications or whatever accesses the files) to the old naming convention would of course be more desirable than the painful sounding solution of creating and maintaining thousands upon thousands of critical customised links.
    • I'm coming to the same conclusion. I guess I was hoping for a magic bullet though. Thanks for helping me to think it through.

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags