Results 1 to 7 of 7

Thread: What's the easiest way to make a directory system?

  1. #1
    Join Date
    Mar 2008
    Location
    Texas
    Beans
    234
    Distro
    Ubuntu 19.10 Eoan Ermine

    What's the easiest way to make a directory system?

    I have a text file, a list of about two hundred words, indented to simulate a tree directory.

    I would prefer not to have to create and name the folders - I want to plug the list in, or type the words in.

    Anything to make it easier than creating folders and then typing the designations.
    Ubuntu 19.10; Dell 11-3147 upgraded to 480GB SSD, and 8GB RAM

  2. #2
    Join Date
    Jan 2009
    Location
    Millbury, MA
    Beans
    414
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: What's the easiest way to make a directory system?

    Hi sidewalkcynic,

    More than likely there is already something out there to do exactly what you want. I took a quick look and didn't turn anything up but it was a very cursory search - you'll do better, I'm sure.

    Barring that, if you have any coding experience at all, just about any scripting or programming language should provide the necessary functions.

    The quick & dirty way would be to write a simple bash script to read in each line of your input file, parse it, and use the result to create the corresponding directory on disk.

    If you get your text file to me I will try to find the time to give it a go. If you don't want to attach it to a reply here, feel free to pm or email me.

    tgeer
    "Programming is an art form that fights back."

    HP Pavillion DV9500T 17" Notebook • 2.2GHz Core2 Duo • 4GB RAM • Nvidia Geforce 8600M GS 512MB
    Running Ubuntu 10.04 [64-bit]+Gnome+Compiz from HD / Puppy Linux 4.2.1SMP in RAM from USB Flash

  3. #3
    Join Date
    Mar 2008
    Location
    Texas
    Beans
    234
    Distro
    Ubuntu 19.10 Eoan Ermine

    Re: What's the easiest way to make a directory system?

    Yeah, I have been searching myself. And, I have been assuming that it has to be a programming language, and I am bankrupt on programming - got to take the time and figure it out someday.

    My deal is, I am devising the ultimate personal documents directory system with links, but when I make changes it can be a hassle, and is easier to start from scratch; but that gets tiresome in GUI - creating folders. So, I was hoping to find the script text document and do the cut and paste method. I'm sure it's out there . . .
    Ubuntu 19.10; Dell 11-3147 upgraded to 480GB SSD, and 8GB RAM

  4. #4
    Join Date
    Jan 2009
    Location
    Millbury, MA
    Beans
    414
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: What's the easiest way to make a directory system?

    As I stated in my first reply, if you will send me the text file (so I can see the exact formatting/encoding), I will do my best to whip up a shell script to do the job for you. In fact, I've already started but I am nearing a standstill until I see your file. Oh, and there won't be any need for cut and paste, either. You will just run the script with the name of your "tree" text file as a parameter, like this:
    Code:
    ./myscript.sh mytextfile.txt
    It will read each line of the file and create the corresponding directory.

    You can attach the file to a private message here on the boards or as a regular email attachment. Just click on my user name in the top-left of this message.

    I'd been looking for a short but useful programming exercise (just to keep the old noodle sharp, ya know) and this might be just the ticket.

    tgeer
    Last edited by tgeer43; May 25th, 2010 at 09:34 PM. Reason: Edit
    "Programming is an art form that fights back."

    HP Pavillion DV9500T 17" Notebook • 2.2GHz Core2 Duo • 4GB RAM • Nvidia Geforce 8600M GS 512MB
    Running Ubuntu 10.04 [64-bit]+Gnome+Compiz from HD / Puppy Linux 4.2.1SMP in RAM from USB Flash

  5. #5
    Join Date
    Mar 2008
    Location
    Texas
    Beans
    234
    Distro
    Ubuntu 19.10 Eoan Ermine

    Re: What's the easiest way to make a directory system?

    I installed gnome-commander, and I am going to try it out - maybe it will be of benefit to what I am approaching.
    Ubuntu 19.10; Dell 11-3147 upgraded to 480GB SSD, and 8GB RAM

  6. #6
    Join Date
    Mar 2009
    Location
    Northampton MA USA
    Beans
    53
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: What's the easiest way to make a directory system?

    What happend to this project?

  7. #7
    Join Date
    Jan 2009
    Location
    Millbury, MA
    Beans
    414
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: What's the easiest way to make a directory system?

    Well, for starters real life intervened (it has a nasty habit of doing that).

    Also, I never received the directory structure file that I requested from the OP. I still have the script that I started laying around here somewhere. If given the specific data to be worked upon, I'm still willing to try and find time to whip something up but I definitely don't have enough spare time to write something that is going to work on a wide variety of input files. It would have to be a case-specific, quick & dirty script.

    Regards,

    tgeer
    "Programming is an art form that fights back."

    HP Pavillion DV9500T 17" Notebook • 2.2GHz Core2 Duo • 4GB RAM • Nvidia Geforce 8600M GS 512MB
    Running Ubuntu 10.04 [64-bit]+Gnome+Compiz from HD / Puppy Linux 4.2.1SMP in RAM from USB Flash

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •