Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Extract here makes subfolder. DO NOT WANT

  1. #11
    Join Date
    Oct 2013
    Beans
    6

    Re: Extract here makes subfolder. DO NOT WANT

    BUMB!

    Can someone please give me the commands please.

  2. #12
    Join Date
    Nov 2008
    Location
    Kingdom of cookies
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Extract here makes subfolder. DO NOT WANT

    Quote Originally Posted by edward-holystone View Post
    OK I give up with.

    These three folders contain the subfolders inside of which the loose files are located:
    /home/edward/Documents/Beatmap1
    /home/edward/Documents/Beatmap2
    /home/edward/Documents/Beatmap3

    I want to move the loose files inside the subfolders into this folder:
    /home/edward/Documents/Songs

    The subfolders are called "Beatmap Pack #001" All the way to "Beatmap Pack #300"
    The loose files in each subfolder have completley random names, starting with different numbers, letters and symbols.
    Code:
    UNRAR 4.00 beta 3 freeware      Copyright (c) 1993-2010 Alexander Roshal
    
    Usage:     unrar <command> -<switch 1> -<switch N> <archive> <files...>
                   <@listfiles...> <path_to_extract\>
    try
    Code:
    cd /home/edward/Documents/Beatmap1
    mkdir tmp
    unrar e *rar tmp
    find tmp -type f -print0 | xargs -0 mv -t  /home/edward/Documents/Songs
    i would test with a few files first
    Last edited by sandyd; October 18th, 2013 at 01:43 AM.
    Ubuntu Forums Moderation Staff || SandyDNET
    Twitter: @CatchesAStar | Last.fm
    Ubuntu Membership via Forum Contributions

  3. #13
    Join Date
    Jun 2007
    Beans
    13,065

    Re: Extract here makes subfolder. DO NOT WANT

    maybe just not use "extract here" from the context menu, instead right click on an archive > Open with Archive Manager, then click on the Extract button in the toolbar
    The pop up screen should be self explanatory, in your case Do uncheck "Keep directory structure" under "Actions"

  4. #14
    Join Date
    Oct 2013
    Beans
    6

    Re: Extract here makes subfolder. DO NOT WANT

    Quote Originally Posted by Vaphell View Post
    . is current dir * matches anything
    post your directories so you get a ready to use command

    either way looking at the screenshots
    ctrl+alt+t to open terminal

    Code:
    cd ~/Downloads/*Beatmap*100
    enter your_home_dir/Downloads/<something>Beatmap<something>100, if the name is unique and matching, the shell should resolve it despite * wildcards. Had to use wildcards because the full name is not visible in the screenshots

    Code:
    mv -t . ./*/*
    move all files from subdirs ( ./*/* = current dir/subdirs with any name (all)/everything with any name to a target dir . (current)

    Code:
    cd ../*Beatmap*200
    go up 1 level (Downloads, ..=parent dir) and down to <something>Beatmap<something>200

    Code:
    mv -t . ./*/*
    again move anything from subdirs to the top/current directory

    Code:
    cd ../*Beatmap*300
    enter parent_dir/<something>Beatmap<something>300

    Code:
    mv -t . ./*/*
    move stuff



    this should move all the files from the extraction dirs to their respective master dir
    extract one rar and check if the relevant pair of commands works
    you can copy paste these commands one by one by highlighting here and middleclicking in terminal to paste or with ctrl+c/ctrl+shift+v

    IT WORKED

    Thanks for the help, you're a life saver.

Page 2 of 2 FirstFirst 12

Tags for this Thread

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
  •