Home | Community | Message Board


This site includes paid links. Please support our sponsors.


Welcome to the Shroomery Message Board! You are experiencing a small sample of what the site has to offer. Please login or register to post messages and view our exclusive members-only content. You'll gain access to additional forums, file attachments, board customizations, encrypted private messages, and much more!

Jump to first unread post Pages: 1
Invisiblem00nshine
ÜBER SHAMAN
Male User Gallery


Folding@home Statistics
Registered: 11/18/05
Posts: 9,774
Loc: BALLS DEEP
Hope someone can help me with this - file transfer question
    #14050634 - 03/01/11 07:31 PM (13 years, 4 days ago)

I'm trying to move audio files that are in folder like this:

\artistname\randomfolder\song.mp3

and I want to move everything to a folder on the desktop,

desktop\a

This is on a current mac

I know linux so I can use the terminal well

Does anybody know of a good script or of how to write one?

Thanks for any help.


--------------------

Extras: Filter Print Post Top
Invisiblefrith
God

Registered: 10/27/09
Posts: 7,512
Loc: Philadelphia, PA Flag
Re: Hope someone can help me with this - file transfer question [Re: m00nshine]
    #14051191 - 03/01/11 09:09 PM (13 years, 4 days ago)

you want all the .mp3 files in one directory? you dont want to organize them at all?

if everything is in that folder structure, you could just copy everything like this:

Code:
cd /path/to/music/
cp */*/*.mp3 /home/username/Desktop/music/



or if you just want to move all the directories from one location to the other you could do:

Code:
cd /path/to/music/
cp -r * /home/username/Desktop/music/



you need the -r option to copy directories. without it, cp will copy the files directly specified and ignore all the subdirectories and their included files.

i know the OSX filesystem hierarchy is a little different than linux so the desktop path may be a little different.


--------------------

Extras: Filter Print Post Top
Invisiblem00nshine
ÜBER SHAMAN
Male User Gallery


Folding@home Statistics
Registered: 11/18/05
Posts: 9,774
Loc: BALLS DEEP
Re: Hope someone can help me with this - file transfer question [Re: frith]
    #14051257 - 03/01/11 09:21 PM (13 years, 4 days ago)

Great, thanks once again.

I didn't know you could use the wildcard for directories, too.

:yourock:


--------------------

Extras: Filter Print Post Top
Invisiblefrith
God

Registered: 10/27/09
Posts: 7,512
Loc: Philadelphia, PA Flag
Re: Hope someone can help me with this - file transfer question [Re: m00nshine]
    #14051308 - 03/01/11 09:32 PM (13 years, 4 days ago)

yep. you can use them for anything.

i guess heres another tip that i just thought of.. when i show people some basic terminal navigation most dont think about the .. directory thing.

.. lets you move up one level in the filesystem hierarchy.

for example: if you wanted to copy ~/Music/rap/something.mp3 to ~/Music/country/ you could do this instead of writing out the whole file path:

Code:
cd ~/Music/rap/
cp something.mp3 ../country/




yay term tips! :awesome:


--------------------

Extras: Filter Print Post Top
OfflineSeussA
Error: divide byzero


Folding@home Statistics
Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 23 days, 17 hours
Re: Hope someone can help me with this - file transfer question [Re: frith]
    #14052867 - 03/02/11 04:46 AM (13 years, 3 days ago)

I would have used cpio or rsync rather than cp to preserve timestamps.


--------------------
Just another spore in the wind.

Extras: Filter Print Post Top
Invisiblefrith
God

Registered: 10/27/09
Posts: 7,512
Loc: Philadelphia, PA Flag
Re: Hope someone can help me with this - file transfer question [Re: Seuss]
    #14055400 - 03/02/11 03:49 PM (13 years, 3 days ago)

true.. i dont generally care about sorting by date :shrug:


--------------------

Extras: Filter Print Post Top
Jump to top Pages: 1


Similar ThreadsPosterViewsRepliesLast post
* question about cable modem w/router youtelephonecall 1,456 3 10/25/02 04:16 AM
by Ythan
* Microsoft's Really Hidden Files. Lana 7,924 18 07/11/02 02:14 PM
by Lana
* Networking laptop to desktop, easy and how? TackleBerry 1,047 8 06/21/03 05:33 PM
by Scvotto_Turellskey
* For anyone looking to try linux as a desktop OS
( 1 2 all )
windex 5,971 37 02/07/03 12:32 AM
by Malformed
* Please help, reverse cellphone directory distortion 681 2 02/18/05 08:55 PM
by chocbruce
* How to rename windows directory ? T0aD 1,557 9 11/25/03 12:56 PM
by funkymonk
* Deleting a file sercurely daussaulit 1,958 13 08/03/03 04:31 PM
by Meph
* Newsgroup question Northernsoul 844 4 02/20/03 01:16 AM
by Northernsoul

Extra information
You cannot start new topics / You cannot reply to topics
HTML is disabled / BBCode is enabled
Moderator: trendal, automan, Northerner
357 topic views. 0 members, 0 guests and 1 web crawlers are browsing this forum.
[ Show Images Only | Sort by Score | Print Topic ]
Search this thread:

Copyright 1997-2024 Mind Media. Some rights reserved.

Generated in 0.021 seconds spending 0.004 seconds on 12 queries.