Results 1 to 10 of 17

Thread: Help with Directory Structure Naming

Hybrid View

  1. #1
    Join Date
    Oct 2008
    Location
    UK
    Beans
    1,162
    Distro
    Ubuntu 13.04 Raring Ringtail

    Help with Directory Structure Naming

    I'm trying to copying my photo collection of thousands of photos that are in a folder structure into a single folder so that I can look at managing my collection via tagging rather than having a fixed folder structure. I have looked at several terminal commands and I'm getting to understand(!) what they mean. However, they all fall down with the folder names - I keep getting messages such as No such file or directory - so my naming must be wrong. I keep trying different things like /Home/Pictures/photos, or I cd to Pictures and try photos/ or /photos/ but I'm not getting it right. My latest failure is:

    dad@dadubuntu:~$ find /Home/Pictures/photos -type f -exec cp {} /Home/Pictures/single folder/ \;
    find: ‘/Home/Pictures/photos’: No such file or directory
    dad@dadubuntu:~$


    so in my Pictures folder I have my photo collection in a top level folder called photos. I'm trying to copy all the files into another folder in Pictures called single folder. Any help appreciated as I have too many photo files to copy and paste - this would truely help if I can get this naming convention right.
    Last edited by Quarkrad; November 7th, 2012 at 09:19 AM.

  2. #2
    Join Date
    Jun 2007
    Location
    Malvern, UK
    Beans
    992
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Help with Directory Structure Naming

    it's 'home'. not 'Home'

  3. #3
    Join Date
    Oct 2008
    Location
    UK
    Beans
    1,162
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Help with Directory Structure Naming

    Still doesn't work.

    dad@dadubuntu:~$ find /home/Pictures/photos -type f -exec cp {} /home Pictures/single folder/ \;
    find: ‘/home/Pictures/photos’: No such file or directory
    dad@dadubuntu:~$ sudo find /home/Pictures/photos -type f -exec cp {} /home Pictures/single folder/ \;
    [sudo] password for dad:
    find: ‘/home/Pictures/photos’: No such file or directory
    dad@dadubuntu:~$


    note. this is a test of only four sub folders and a small number of files within each in Picures/photos. If I can get this to work I will try on my actual collection.

  4. #4
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: Help with Directory Structure Naming

    You're missing your username, the full path should be:
    Code:
    /home/dad/Pictures/photos
    or
    Code:
    ~/Pictures/photos
    ~ is a shorthand way of writing your home directory.
    Cheesemill

  5. #5
    Join Date
    Oct 2008
    Location
    UK
    Beans
    1,162
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Help with Directory Structure Naming

    That did it - many thanks.

  6. #6
    Join Date
    Oct 2008
    Location
    UK
    Beans
    1,162
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Help with Directory Structure Naming

    For some reason I'm getting outputs with a lock and cross when I use this command:

    sudo find /home/dad/Desktop/old -type f -exec cp {} /home/dad/Desktop/new \;

    or

    sudo find /home/dad/Desktop/old -type f -exec cp {} /home/dad/Desktop/new/ \;

    see attached.

    I can't understand while this is happening. Also, despite my efforts to get rid or rename duplicates before I execute this command some do get through. Is there a way to ammend this command so that if a duplicate file (they are photos) is found it is renamed reather than over written?
    Attached Images Attached Images
    Last edited by Quarkrad; November 18th, 2012 at 09:05 AM.

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
  •