Automator question - go easy on me!

I am trying to find a quick and easy way to transfer music files randomly a HARD drive more of 1 TB of music on a 4 GB key to use in the car. I searched everywhere for a simple application to do so, but the two that need to run on Mac, Mix2Stix and Mr. Random (they work using Java) for some reason any do not work for me. So I thought maybe Automator could make this happen, but I have NO idea on what to do here, as I've never programmed anything on Automator - or much else - ever.

So - I hope someone can help me find an easy way to automator.

The source drive is simply called 'Music' and from there, it has about half a dozen records. In some of these files are mp3 files, others are albums in folders which then lead to mp3 files.

The source is a USB key, called "Untitled".

I want to be able to plug in my MBA and then run a simple script that will choose random MP3s to a maximum size that could be entered manually and then proceed to a random selection of transfers of files on the stick.

Ideally, is it possible to get Automator at random and look inside files to mp3 files?

Go easy on me here because I don't know what to do or even how to manually write the text in a control.

Any help appreciated.

Hello

You can create an Automator workflow, like this:

In the first action, put the source file or HD source.

Here's the script to paste into the action "Run Shell Script":

maxSize=4000000 ### size in KiloBytes, 1024 bytes = 1KB
source=$1
totalSize=0
tmpFile=$(mktemp /tmp/_temp_File_XXXXXXXXXXX)
find "$source" -iname '*.mp3' -print  > "$tmpFile"
tc=$(wc -l < "$tmpFile")
jot $tc 1 $tc | perl -MList::Util=shuffle -e 'print shuffle()' | while read thisNum;do
  f=$(sed "$thisNum q;d" "$tmpFile")
  s=$(du -k "$f" | grep -o '^[0-9]*')
  ((totalSize += $s))
  if [ $totalSize -gt $maxSize ]; then break; fi
  echo "$f"
done
rm "$tmpFile"

Tags: Mac OS & System Software

Similar Questions

  • Question about "easy connect naming".

    Good evening

    My setup consists of 11 GR 2 when the host and client are on the same machine.

    I wanted to test the "Easy Connect Naming" feature, to that end, I've renamed the tnsnames.ora and proceeded to connect using the following command:
    sqlplus sys/abc123@"Oracle2Day1.john.local/orcl.john.local:1521" as sysdba
    as expected, the command has managed to connect to the orcl instance.

    To make sure that everything was as expected, I also tried:
    sqlplus sys/abc123 as sysdba
    Against all odds, this command is also connected to the orcl instance.

    I expect to fail since there is no tnsnames.ora and I did not specify the names of hospitality and service.

    " Is: why was the command sys/abc123 sqlplus as sysdba ' success given that there is no tnsnames.ora?

    Thank you for your help,

    John.

    "The question is: why was the command sys/abc123 sqlplus as sysdba ' success given that there is no tnsnames.ora?

    Above works only when you are connected directly to the DB server, because this flavor of connection doesn't use SQL * Net; but uses the Protocol of DOB.

  • Question perhaps easy/mute about the #header tag

    Let's say I have two models in a single site. I would like to add a third to test changes to the look of my site.

    Is the #header tag, or other page-specific tags in which they reside, or they apply site-wide? In other words, can I have two #header, or any other tag in the same site without inconsistency between them?

    Thanks in advance for any help.

    Glenn

    There is no such thing as a #header tag. Are you referring to a CSS ID
    selector of?

    #header {...}

    ???

    An ID selector must be unique on a page. It can be used several times in
    the site. In other words, any given page can have only ONE instance of a
    HTML element with the attribute ID with a value of 'head ' -.

    --
    Murray - ICQ 71997575
    Adobe Community Expert
    (If you * MUST * write me, don't don't LAUGH when you do!)
    ==================
    http://www.projectseven.com/go - DW FAQs, tutorials & resources
    http://www.dwfaq.com - DW FAQs, tutorials & resources
    ==================

    "GEAtkins" wrote in message
    News:g0dhsf$P5i$1@forums. Macromedia.com...
    > Let's say I have two models in a single site. I would like to add a third
    > to
    > experience changes to the look of my site.
    >
    > Is the tag #header or one of the other tags specific to the page in which
    > they
    > live or apply site-wide? In other words, can I have two #header
    > or
    > any other reference in the same site without inconsistency between them?
    >
    > Thanks in advance for any help.
    >
    > Glenn
    >

  • Newb question (hopefuly) easy

    I'm new to Java / JSF and I'm picking the bits of code of different examples and trying to learn how it all works.

    I have the code that I found in the SRDemo things.

    The list < number > copyOfTrainingCenterIds = cloneList (TrainingCenterIds) (list < number >);
    ViewObject trainingCenters = getTrainerMessageTcs1View2();

    for (number trainingCenterIdToAdd: copyOfTrainingCenterIds) {}
    ...

    It compiles, but when I call it when running I get the following error in the loop for
    Error
    Taken unexpected exception: java.lang.ClassCastException, msg = java.lang.String cannot be cast to oracle.jbo.domain.Number
    Error
    java.lang.String cannot be cast to oracle.jbo.domain.Number

    Any thoughts?

    List copyOfTrainingCenterIds = (TrainingCenterIds) cloneList (list);

    Try

    List copyOfTrainingCenterIds = (TrainingCenterIds) cloneList (list);

    or

    Within the loop are you fetch any value of the attribute as below;

    oracle.jbo.domain.Number temp =...;

    It must be String not oracle.jbo.domain.Number.

  • Keyboard question

    Other than the Google keyboard with the gesture by typing what is the difference between the Android (ASOP) keyboard we have and available at the game store keyboard from Google?

    https://play.Google.com/store/apps/details?ID=com.Google.Android.InputMethod.Latin&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5nb29nbGUuYW5kcm9pZC5pbnB1dG1ldGhvZC5sYXRpbiJd

    Also is there a way to disable the default android keyboard? It is grayed out so I can't do anything with it.

    Not sure about your first question, the second question is easy. Tap Settings > App > all > keyboard Android (AOSPS) > disable. It will even remove it of all parameters. I hope this helps.

  • Name covering the sticker in the see column

    Hello

    I recently had problems with the pictures of the column view. It seems that sometimes the name which is normally displayed on the file begins to display on top of the thumbnail of the file on the far right. It will happen usually after I moved to a new file and a new preview. I will include pictures to illustrate:

    Here's an example of what it should look like:

    Here is an example of the question:

    The question is easy, although temporarily fixed by changing to a different display format, such as list and switch back. I'm more worried that this may be an indication of some sort of bug or problem.

    All this began after I had several problems do transfers of data on three different drives, and my phone has restarted following a 'problem '. Please let me know if anyone has come across this problem before, or has any ideas about what may be the issue. I already rebooted my laptop a few times as good viewfinder also restart all leaving the laptop on... Specific computer below information:

    MacBook Pro (13-inch, mid-2012)

    El Capitan 10.11.5 OSX

    Processor: 2.9 GHz Intel Core i7

    Memory: 16 GB 1600 MHz DDR3

    Graphics card: Intel HD Graphics 4000 1536 MB

    Let me know if there are any other details necessary to diagnose this problem. Thank you.

    Try the start mode by holding down the SHIFT key at startup. Secure boot is quite slow because the operating system performs some cleanup and verification tasks, so give it time. Once you're completely connected, restart normally.

  • Help please with iMAP

    Hello

    This question was easy to fix on my iOS devices, but on my iMac its driving me nuts. I recently changed all my accounts pop3 to iMap to sync all of my accounts on devices to save time deleting emails but my iMac will not play.

    I used to use the back (left arrow) button to delete the messages, but it won't work, even for mt iCloud account. Also the trash can button at the top of the mail will not work.

    What does not work, is if I double click the mail to open it in a separate window, and then use that the trash can button on this window, the mail is deleted!

    It's long-winded is I want to delete a load of junk mail or mail, I only need to read a preview before you delete.

    So, how can I fix this please?

    Just a thought,

    but have you tried a different email client, such as Mozilla Thunderbird? the problem here? I've always found annoying Apple Mail with iMAP accounts.

  • built-in laptop computer keyboard problems A45-s120

    I'm having a problem with my keyboard. the integrated keyboard has a few letters that simply do not work. I tried everything to get to work, nothing helps. [It is not the only area of the keyboard, it's the letters sdgq and characters,.] [They work if I connect a keyboard to the laptop, but not on the built-in keyboard.

    What can I do, what can be the problem.

    I think it might still be under warranty years, but am not sure.

    Hello
    seem to be a defective keyboard for me.

    The security question is easy to answer for me.

    Tell me your serial number that I can tell you, if it is still under warranty.

    Good bye

  • Satellite M300 - does not start

    G ' Day

    I have a M300 and it does not turn. When I plug in the adapter the orange charge light turns on and the light green card but the computer does not light when you hold the button.

    Is this a problem with the charger, as I just buy a new one or is it the computer itself?

    Hello

    > Is this a problem with the charger, I just buy a new one or is it the computer itself?
    In my opinion, this question is easy to answer: If your new AC/DC adapter is an original piece of Toshiba, the problem is with the computer itself. If this isn't the case, you should buy a new and original Toshiba AC adapter.

    Check it!

  • Update hard disc on Satellite L350 - 10L

    Hello

    Anyone has improved their Satellite L350 - 10L for one SSD hard drive and if so, have you noticed a difference and the big question, was easy?

    Thank you
    Chris

    Hello Chris

    Very long ago I had Satellite L300 and this series is known for me.
    At that time I didn't even think about these updates.
    The Satellite L Series notebooks are machines of low budget and hardware configuration is not one that suits.
    In other words, they are designed for daily activities. I can understand that you may want to increase the performance of your hardware, but my personal opinion is that the SSD is not the best solution. In my opinion you should not spend a lot of money for upgrades. Memory improve maximum and that s.

    What do you think of all this?

  • Satellite A100: Cannot switch to the internal screen

    I apologize in advance if the answer to this question is easy - I have major concern.

    I am an instructor and yesterday was to use a projector to clients to connect my laptop to a session. All was well at first with the laptop screen and projector showing the image, but one of the participants decided to help me and I lost the picture on my laptop (even if not connected to a projector)

    When I turn on the laptop everthing shows on screen (Toshiba etc.) until I get into Windows, then it shows just the ripple background with no icons, however if connected to a projector is displayed.

    I tried fn F5, but is not offer me options normal and I can't reset it.

    Thanks in advance for any help provided

    I put t know what the problem is here, but using the FN + F5 key combination, you should be able to get the LCD screen only. If it works please check display properties. Perhaps it is - someone has activated the extended view option and the value of LCD as second.

    Check this possibility.

  • DI/O cards such as the 651 x are compatible with PCIe 1 x?

    Hello

    This can be a bit of a stupid question, but it's my first outing with NEITHER and yet I somehow received some amount of responsibility for a very strange procurement process.  I hope the question is easy to answer and that will mitigate its possible idiocy.

    Are maps such as the NI 651 x (http://www.ni.com/datasheet/pdf/en/ds-105) compatible with PCIe 1 x?  Of the image, it looks like they are designed to run on PCIe 16 x, but since the speed is not a major concern, that I wondered if she settle and operate normally on PCIe 1 x.

    I am limited in contracts with a default value, extensive construction of tower PC organization, whose mother has two PCIe 16 x and two PCIe 1 x.  Since I will probably need three cards, I was hoping that it would be compatible with the PCIe 1 x slot and we would save the hassle of special purchase order form.

    Thanks for any help!

    N ° it is even not a PCIe connection.  It's PCI.  I recommend that you call your local representative of OR discuss your needs and they can help steer you in the right direction.

  • Tiara DAC formula invalid mathematical operation

    Hello

    I will disturb you with a quick question, maybe easy for you, but I've found a solution for my self (I am a novice in working with Diadem DAC)

    Build a schema, and when I run it I get an error (see attachment) "...". invalid mathematical operation"and I don't know what the problem is.

    Maybe I do not know how to work with the formula block, and maybe you can give me some advice.

    Please take a look at this error (see attachment) and tell me what to do.

    Normal 0 21 false false false OF X-NONE X-NONE MicrosoftInternetExplorer4 / * Style Definitions * / table. MsoNormalTable {mso-style-name : « Normale Tabelle » ; mso-tstyle-rowband-taille : 0 ; mso-tstyle-colband-taille : 0 ; mso-style-noshow:yes ; mso-style-priorité : 99 ; mso-style-qformat:yes ; mso-style-parent : » « ;" mso-rembourrage-alt : 0 cm 5.4pt cm 0 5.4pt ; mso-para-marge-haut : 0 cm ; mso-para-marge-droit : 0 cm ; mso-para-marge-bas : 10.0pt ; mso-para-marge-gauche : 0 cm ; ligne-hauteur : 115 % ; mso-pagination : widow-orphelin ; police-taille : 11.0pt ; famille de police : « Calibri », « sans-serif » ; mso-ascii-font-family : Calibri ; mso-ascii-theme-font : minor-latin ; mso-hansi-font-family : Calibri ; mso-hansi-theme-font : minor-latin ; mso-fareast-language : EN-US ;}

    HI Maria,

    It seems that you are using DIAdem 10.2. In this version, there is a limit to the name of the symbol in block f (x) of 16 characters. If you change the name it works fine (Please take a look at the attachment). This changed with DIAdem 11.0 or later.

    Referring to your second question, I'm not that I really understand the problem. Please can you explain what you would do?

    Greetings

    Walter

  • ATI radeon xpress 200 - a1350n - AmberineM-GL6E - share more memory video

    Hi guys my question is easy to explain... I guess the title says it all...

    .....

    I have an old PC HP a1350n that came from the factory with a card mother AmberineM-GL6E and ATI Radeon Xpress 200 as integrated video card.

    Well, my problem here.

    Like I said:

    HP Pavilion Media Center a1350n desktop PC

    AmberineM-GL6E< i="" guess="" is="" from="" asus="" i'm="" not="">

    BIOS version: 3.01< i="" remember="" that="" was="" the="" original="" verios="" of="" the="" bios="" before="" i="" upgraded="" to="">

    Video integrate Chip: ATI Radeon Xpress 200< actualy="" is="" at="" 64="" of="" memory="" shared="" with="" 1gb="">

    My problem is that now my PC has 2 GB of installed ram (2x1GB) and always has 64 MB shared memory...

    Before I updated the bios to 3.15 the option in the Bios that allows you to change the size of the memory could be changed, but now after the upgrade is not possible and with grey letters.

    How can I fix?

    http://h10010.www1.HP.com/ewfrf/wc/document?cc=us&LC=en&DLC=en&docName=bph04502#N296

    It is a link that explains some of what I try to explain...

    Also... I have the same problem with another PC (a1450n), but this came with an nvidia chip...

    ... so no idea what can do? to share more memory for the video chip?

    Or should I get the BIOS? (where can I faund drop to do?)

    Note:

    I forgot to say, that in version 3.01, I could share to 256 MB and which was then my PC have had only 1 GB of RAM (2 x 512) which, in the case of the a1350n with radeon express 200

    But in the case of a1450n, I got 126MB with 512 MB of RAM (2 x 256) even at 3.01 version 3.11 BIOS... but now I can't do that... also the option disappeared o.0? WT@$%# !!!

    Unless you saved the BIOS ROM file before you upgrade maybe isn't you luck. Since you ask about it, you have not.

    The original BIOS is not available on the web portal of support for such an old desktop PC.

    You can, if you are willing to take the risk, go on the forums of mod BIOS to get a utility that can return this function to your option of the BIOS screen.  Forums Mod BIOS should have what you need.

  • vista to vista transfer

    Hello
    I might need to transfer files from one Vista computer to reload the same Vista machine.  There are many ways to do it, but I only have questions on "Easy Transfer".  They are lower.  Any response to the sub questions would be much appreciated.  Thank you.

    1. If I read the information Windows 7 easy transfer correctly ( here and here ), I can't use this version to transfer files and settings to a Vista machine on a Vista machine.  Is this correct?
    2. Are there dangers that I should be aware of when using 'old' to 'new' vista vista Windows Vista to transfer easy transfer?

    Thanks again.

    Tony

    1. not true.  Windows Easy Transfer in Vista can transfer files and settings from one Vista computer to another.

    2. No.  To borrow a phrase, "it works." :-)

Maybe you are looking for