• Wanted : Remove folder hierarchy

    Author
    Topic
    #433170

    I always come back here when I’m stumped!

    Wanted! A program that will remove the folder folder hierarchy from a specific folder. i.e. All files within the specified folder will be brought back up to the highest folder level regardless of the sub folders they might have existed in. (Interesting questions about duplicate file names)

    Anybody have anything in mind that might do this?

    Thanks all

    Viewing 3 reply threads
    Author
    Replies
    • #1018071

      Haven’t tried it but have a look at:

      File Sieve near the bottom of the page. free

    • #1018072

      In general, that won’t work.

      In addition to the file naming issue, there’s the matter of, e.g., HTML files that include references to files in subdirectories.
      While these could be modified programmatically, there’s still the issue of programs referring to subdirectories, and other types of files that might have links.

      • #1018133

        >In general, that won’t work

        Howard, that is a very large generalisation. If it is a matter of “moving” documents to a higher level in a directory hierarchy, of course it can be done. If the was a dependency between the documents then it would be foolhardy to do it unless it was for archiving.

        If there was dependency then it would be just a matter of zipping or filing a whole directory or root folder set. Mentioning the HTML is, in my opinion, a blind alley as there would be not rhyme or reason to move these to upper level folder hierarchies as refential links would automatically be lost and you would more than likely do this within an application like Dreamweaver.

        • #1018137

          Yes, but one could not generalize a program to do such moves.

          There’s no way to know how to fix internal links, or when there are directory associations, such as with HTML files.

    • #1018077

      Wow. Now that is an impressive response time!! (If only my project teams could get back to me so fast!)

      I note the issue about relative folder references within certain filetypes / programs. Luckily I can live with this as these are data files and have no dependence (The hierachy was anachy – I wanted to address and re organise)

      I’ll take a look at the File Sieve, thanks for the pointer. I’ll report back if it’s good

      Cheers both – really appreciated

      • #1018154

        With those restrictions the task is easy.
        All code needs to is have a user identify a directory, then recursively walk the path backwards.
        But make sure prog is only used in cases where files have no dependencies,

      • #1018361

        If you want to do some work yourself (walk the folder structure), there was a script that some Loungers did for me back in Feb. I had asked for a capability to move (or copy) a file from one folder to its parent. I think there were some minor issues still open when we terminated the thread, like the duplicate file names. What you can do is highlight a bunch of files in a subfolder and then run the script; the files are moved to the subfolder’s parent. See post 557494 for one of the posts on the thread; you should be able to go from there if this is useful.

        There were also some other ideas on that thread for file mgmt.

        Since that thread is pretty long, I could attach the script if you want it. I use it quite a bit but not for the same reasons you do.

        Fred

    • #1018391

      Hello,

      Would it be possible to just use Windows Search on the root folder and leave the search term blank? The resulting list should include all the files, sort by type and then select all the files and drag them to a temporary folder. Then delete all the folders and copy the files back into the original folder. The downside is that if you have a lot of files with the same name you will get asked whether to replace a file lots of times.

      Chris (Hunt)

      • #1018569

        Hi all
        Thanks for the comments (I will take a look at modifying that script)

        Cah. You are quite right, in fact that is what I have been doing… Just feels a little clumsy and I was interested if anybody had already dealt with this issue

        Cheers

    Viewing 3 reply threads
    Reply To: Wanted : Remove folder hierarchy

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: