Software/Script USB/SD auto copy.

Hi,
I have a server which i want to be as automated as i can get it. I'm using it for an fileserver (and other things). What i want to accomplish is when i insert my SD from my camera that the server automatically copy's the files in from the sd cards picture folder to a new folder (which needs to be created automatically with the date YYYY-MM-DD-HH-MM exp 2012-02-17-12:22) to the server. I would also need something in the likes of this for an usb stick i use for work. Files in a specific folder need to be copy to another folder (which already exists on the server).
I'm not sure if this can be done trough software or i need to start learning some scripting.
Thanks in advance.

Your best bet would probably be some simple BASH scripting. The only real trick is detecting when the SD card is inserted. I think you would probably need to write a custom udev rule that executes your script when a SD/USB device is mounted.
Here's some framework to get you started:
#/bin/bash
#SDdump.sh
#usage: SDdump.sh <device>
DIR=`date +%Y-%d-%H:%M`
#some sort of error checking
if [ -e $1 ]; then
echo "$1 does not exist"
return
fi
#move to and create new directory
cd /home/user/My_Pictures
mkdir $DIR
cd $DIR
#copy pictures
cp -r $1/*.jpg .

Similar Messages

  • Script to auto copy everything on DVD insert

    Hi,
    I have about 150-200 back up DVD's that I want to transfer to hard disk. The hard disk is on a headless server. I would like to have the server auto copy everything from the DVD to a certain folder when I insert it and, if possible, eject the tray when finished. Can someone give me some pointers on where to start? Can autofs start a script when I insert the DVD? Or am I going to have go about it a different way?
    Thanks for any suggestions you might have.

    Captivate won't create your auto detect script out of the box.  You'll need to look into this option elsewhere.  It's possible to use sniffer scripts with JavaScript, but this is probably the wrong forum to ask about it.  You need to find a forum full of JS gurus.
    Once you DO find the code, you can perhaps think about modifying the HTM templates that come with Captivate to include the extra sniffer code you need so that every time you publish it will automatically be included and redirect the user as needed.  However, my personal suggestion is that you place the sniffer code into a page all by itself and then have it redirect to the HTML5 or HTM/SWF version of published content as required.  That way, if you ever need to make changes to how this code works, you only have to make the code in one place.  If the code is nailed into the published HTM of each and every Captivate module you upload, it's going to be a bear to maintain.
    I Googled for "sniffer scripts for HTML5" and found several promising sites.  But the thing you need to remember is that HTML5 is very much still in its infancy at the moment and anything you build for it is likely to need a lot of maintenance for the foreseeable future to keep up with all the new devices, formats, and semi-functional technologies.

  • Auto copy one pixel row from image....

    Can someone help me write a script that:
    - from my selection (1 pixel row)
    - auto copy selected area to next row into new layer (up or down)... and so on (into the same second layer)... until it reaches the end of the image
    - the result is a photos with two layers; in the first is my image and in second is multicolored pattern

    I don’t see a problem; naturally the Selection should be a vertical column.
    One should include a check for this condition, I guess.
    // 2012, use it at your own risk;
    #target photoshop
    if (app.documents.length > 0) {
    var originalRulerUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    myDocument = app.activeDocument;
    // new layer;
    var id14 = charIDToTypeID( "CpTL" );
    executeAction( id14, undefined, DialogModes.NO );
    var theLayer = myDocument.activeLayer;
    var theHeight = theLayer.bounds[3]-theLayer.bounds[1];
    var theCheck = false;
    var theCounter = 1;
    // duplicate, move and merge the layer;
    while (theCheck == false) {
    if (theLayer.bounds[0] > 0) {
    var theCopy = theLayer.duplicate();
    theCopy.translate(theLayer.bounds[0] - theLayer.bounds[2], 0);
    theCounter++;
    var theLayer = theCopy.merge();
    //$.writeln(theCounter);
    else {theCheck = true};
    // reset;
    app.preferences.rulerUnits = originalRulerUnits;

  • Feature Request: Ultrabeat: Load Sample auto copy file name to Drum Voice

    Feature Request: Ultrabeat: Load Sample auto copy file name to Drum Voice
    I wish that when I load a sample into a drum voice, that it would automatically copy the name of the sound file I'm importing to the drum voice minus the extension. If I were importing BD01.wav I'd like for the drum voice to display BD01. As it is, I have to import the file, then name or rename the drum voice to BD01. When importing large quntities, this becomes a giant pain, and I'm looking for anything programmatic that could save me a load of time. When I think of all the time I'm going to waste...and if you multiply that by all the number of users...that's a lot of wasted time.
    I wish of course that the program could suck up and autoload all of the sound files within a directory, names too, until the voices were full. Then I could just fine tune and kick out ones I don't want or want in different order. Not a big deal for users who are importing from all kinds of different sources, but say for impoting libraries like NI's Battery, it's a big deal.
    Maybe these could be choices in the load sample menu.
    powerbook G4   Mac OS X (10.4.4)  
    pb g4   Mac OS X (10.4.4)  

    Microsoft pulled the plug on DirectSound HAL in Vista due to lack of hardware support. The SAL exists for
    software compatibility, good intention but bad performance as there is no longer a direct path from
    DirectSound to audio drivers.
    People choose DirectSound for its Direct-ness
    but there is no reason to choose it now.
    DirectX SDK was integrated
    with WIndows SDK which ships with Visual Studio 2012 so you don't need additional downloads for
    WASAPI and XAudio 2.
    Just look up the documentation for headers/librarieslike every other Windows API you use. If you have a hard time to find the documentation then you need to go to search engines and find search engine tutorials. 
    There are plenty of samples for both WASAPI and XAudio 2, both in the Windows SDK and online. The DirectX team has some suggestions on which to use on their team blog.
    You can find experts for those APIs at the Windows Desktop Pro-Audio Application Development forum and the
    Audio/XACT forum on MSDN (link left out for you to practice your search skills). Again, it is fine to ask for hints but don't ask the whole
    solution. You are competing with others who just need a hint to finish work here. The time spent on working on your assignment would be better spent on helping on giving hints to others. 
    Visual C++ MVP

  • Auto-copy to clipboard

    Auto Copy is a very handy extension available for Firefox which automatically delivers selected text to the clipboard. Does anyone know of a similar extension or plug-in available for Safari?

    I'm puzzled. Same as forever. What's the problem?
    No problem, really, it's just that Auto Copy eliminates the need to go to the keyboard. Selecting the text is, essentially, also a Copy command.
    I am back to using Safari mostly because I have to review hundreds of .pdf docs daily and the Adobe Reader plug-in doesn't work with Firefox's gecko engine. But that little copy feature sure was handy with Firefox.
    TiBook 1GHz; Dual G4   Mac OS X (10.4.5)  

  • Just brought home newly purchased MacBook Pro 15"/Maverick/Retinal Display. To my astonishment, there is NO DVD slot! No one in the store told me about this missing feature. Intolerable, How does one install software? Insert CDs to copy for iTunes?Do I ha

    Just brought home newly purchased MacBook Pro 15"/Maverick/Retinal Display. To my astonishment, there is NO DVD slot! No one in the store told me about this missing feature. Intolerable, How does one install software? Insert CDs to copy for iTunes?Do I have to purchase an external DVD drive? Is one even available? What a crock!

    I’ve owned Macs since 1990 (IICX my first), mostly desktops. Having had DVD/CD drives in all my previous laptop Macs since 2001 -  (2) G4 Powerbooks,  A 17” Mac Book Pro - and also inspecting a friend’s year-old Mac Book Pro which had the DVD slot - unless someone told me at purchase, I had no reason to know that the Retina display version of the 15” had NO DVD drive. ANYHOW, I fully intended to buy the non-Retina display version, because it was cheaper. Unfortunately by the time I got to the Apple store they were no longer selling the non-Retina display version; all versions were ONLY with the Retina display. And the fine distinction of a DVD vs. a non-DVD drive was not pointed out. So now I have to shell out an additional $80 bucks for an external SuperDrive.

  • My iPad2 went blank. Troubleshooter says driver software MTP USB problem, what do I need to do?

    My iPad2 went blank. Troubleshooter says driver software MTP USB problem, what do I need to do?

    iOS: Resolving update and restore alert messages
    For error -50: See error 13 and 14: 
    Error 13 and 14: These errors are typically resolved by performing one or more of the steps listed below:
    Perform USB isolation troubleshooting, including trying a different USB port directly on the computer. See the advanced steps below for USB troubleshooting.
    Put a USB 2.0 hub between the device and the computer.
    Try a different USB 30-pin dock-connector cable.
    Eliminate third-party security software conflicts.
    There may be third-party software installed that modifies your default packet size in Windows by inserting one or more TcpWindowSize entries into your registry. Your default packet size being set incorrectly can cause this error. Contact the manufacturer of the software that installed the packet-size modification for assistance. Or, follow this article by Microsoft: How to reset Internet Protocol (TCP/IP) to reset the packet size back to the default for Windows.
    Connect your computer directly to your Internet source, bypassing any routers, hubs, or switches. You may need to restart your computer and modem to get online.
    Try to restore from another known-good computer and network.

  • What software would I need to copy and burn DVD's

    What software would I need to copy and burn DVD's

    Copy what kind/type of DVDs?  For non-copy protected DVDs you can use Disk Utility (in the Applications folder) to make a disk image of the DVD disk and then burn it back to a disk.
    OT

  • Lost software recovery usb

    I have lost my software recovery usb that came with my macbook air.
    Is it possible to get a replacement and if so how?

    Since you are using Mavericks, it should not matter.
    You have a recovery disk partition built in to your hard drive.  You can recover by holding Command + "R" while booting.

  • Did not auto copy child's value to new parent row

    I have page, which have three level
    l) level 1 is Scroll area (group) , level 2 is Grid( members)
    2) if My Scrollrow1 have two rows on his Grid(level)
    when I add one more row in level 1(my Scroll Arear) , it would auto copy the Grid value.
    what I want is if I add one new row at level 1 , I don't want it auto copy child's value( Grid) to new parent( scroll) row

    This is default behaviour of Effective dated records
    PeopleTools 8.52: PeopleSoft Application Designer Developer's Guide > Planning Records, Control Tables, and TableSets > Effective Dates
    When you run a page with effective-dated records and you insert a row, the system copies the contents of the previous row into the new row to save you keying time. In a large effective-dated table, you do not want to reenter all of the data when only a single field changes. Also, anytime you insert an effective-dated row using PeopleCode, the system copies the contents of the previous row.
    I believe this happens when Effdt is the last key in your record. If you do not want to use this feature, try moving Effdt to a higher order in the key structure.
    Regards,
    Hakan

  • Auto copy cells to second sheet

    hi, good people!
    is there a way to auto copy cells in second sheet.
    i have many rows with data, i want from my sheet1 colum C copy all rows that contain name "apr" to sheet2, and if i add new row with name "apr" it will auto copy it to sheet2... is there a way to do that in iwork
    tnx!

    What you're looking for is called a "Breakout Table." Here's an example, based on your layout above, but with generated pseudo data replacing what's in your image above.
    Main represents your data table. Summary is the breakout table that collect each row of data whose date is in April, 2013.
    Formulas:
    Main contains no formulas.
    Index creates a single column list of numbers to serve as an index of rows containing data within the month noted in A1 of Summary.
    Formula in B2, then filled down the the end of the single column:
    B2: =IF(AND(OFFSET(Main :: $A$1,ROW()-1,0)>=Summary::$A$1,OFFSET(Main :: $A$1,ROW()-1,0)<=EOMONTH(Summary::$A$1,0)),MAX($A$1:$A1)+1,"-")
    Summary uses MATCH to read theindex and transfer data from all rows of Main whose date falls within the month defined by the Date and Time value in A1. (see note below). The MATCH result is used by OFFSET to determine the row of Main from which to obtain data for the current row of Summary.
    Formula:
    A2: =IFERROR(OFFSET(Main :: $A$1,MATCH(ROW()-1,Index :: $A,0)-1,COLUMN()-1),"")
    Fill right to column D, and down to the end of the table.
    Results as shown.
    Notes:
    The data in columns B, C and D are constructed to make it easy to see what row and colun that data came from.
    MATCH is set to find (exact) values. If the exace value is not found, an error message will be generated. the error is trapped by IFERROR, and a hyphen is placed in the cell.
    All dates shown including Summary :: A1, are Date and Time values, with the formatting set to not display the time part of that value. The date in Summary :: A1 is the first of the month you wish to have incuded in the summary. The cell is formatted to show only the month and year of that date.
    All functions used are listed and discussed in the Numbers '09 User Guide, which can be downloaded via the item of that name in the Help menu in Numbers '09.
    Regards,
    Barry

  • Auto copying to clipboard

    I am recieving this message when auto copying to clipboard,
    "signed.applets.codebase_principal_support=true"
    which is not allowing me to pick up the data from web pages that I copy from, grateful for any directions to solve this, many thanks

    Neville, thanks for the question, it's a secure web site and not able to post the page. But the error box that opens says
    ' You need set,  signed.applets.codebase_principal_support=true , in about:config to use this feature'
    Have had a good search for this and found solutions for firefox motzilla etc, but not Safari, any pointers would be a great help.

  • Auto copy command for terminal?

    I want to make Safri history folder auto copy to the other folder as it gets new history. So I can monitor activities.

    Hi,
    Here is an example :
    SQL> copy from scott/tiger@q4_production_server create ord -
    using select * from ord;Array fetch/bind size is 15. (arraysize is 15)
    Will commit when done. (copycommit is 0)
    Maximum long size is 80. (long is 80)
    Table ORD created.
    21 rows selected from scott@q4_production_server.
    21 rows inserted into ORD.
    21 rows committed into ORD at DEFAULT HOST connection.
    Hope this helps,
    Bala
    Laura Michaels (guest) wrote:
    : Am trying to use the copy command in SQL*Plus to copy a table
    : from an Oracle database to a local table on my machine in
    : another format. Keep getting errors. It seems to contact the
    : remote machine fine, but can't locate my local machine or
    figure
    : out where to put it. Any suggestions on how to set up my
    : Windows 95 machine to get the copy command working would be
    : greatly appreciated. Thank you.
    null

  • Whwt is the best simple vinyl ripping software using usb turntable

    What is the best simple vinyl ripping software using usb turntable?

    http://www.networkworld.com/reviews/2009/080709-review-5-usb-turntables-convert. html
    http://vinyl-converter-turntable-review.toptenreviews.com/
    I've always been partial to Numark and Audio-Technica. Have several DJ friends and a client who runs a DJ business, and they use Audio-Technica stuff almost exclusively.
    You may be surprised at how easy it is...
    With the exception of cameras (webcams especially) Macs are pretty much "Plug &Play" with anything USB, and even though I've never used one, reviews say you just plug the turntable in and it reads as a drive.

  • Sent emails, I would like to auto-copy myself. I could with former blackberry

    How do I program my sent email to auto copy myself?

    There is no setting for this on the handset. With BBOS on BIS this could be set in BIS for a given email account, but there is nothing comparable for BB10.
    - Ira

Maybe you are looking for

  • How do i put classes in package in NetBean Environment

    Hello, I install NetBean IDE for developing website using JSP and Servlet. I am using Internal Tomcat provided by this IDE. Problem is this i put java classes in the Class folder of Web-INF folder, but i am not able to access these classes from JSp p

  • Set Status of next document in CHARM

    Hi Solman experts, I would like to automatically set the status of a "next document" in CHARM. For example if i set a close state for a SDCR i would also like the attached "next documents" to also move to a close state (SDHF etc....). I know this is

  • Page background refresh, can I stop it?

    I have what might be 2 questions.  I'm using the apycom jqmenu on my web pages and when I select a menu item and go to another page, the menu highlight just goes back to home and does not stay on the selected menu item and I suspect that part of my p

  • Using Business Transaction Events for Delta Queue

    I'm trying to implement the white paper on using business events to populate the delta queue.  The question I have is can I do this with the WRPL table?  What business event would this be? Thanks in advance, Mark

  • Unable to update my iPhone 3 GS with 4.01

    I have attempted to update my iPhone software multiple times but get error messages. I am trying again but iTunes lists 22 hours for the software download so I think I will get the error again. Any suggestions?