Results 1 to 10 of 13

Thread: Server-side Scripting

Threaded View

  1. #11
    Join Date
    Jan 2010
    Beans
    7

    Re: Server-side Scripting

    Okay, I have managed to get some way further with this. I am now stuck with this code that is supposed to move files from one directory to another:

    PHP Code:
    <?php
    $output 
    shell_exec("sudo find /media/storage/documents -name '*.doc' -type f -exec mv '{}' /media/storage/backup/ \; 2>&1");
    echo 
    "<pre>$output</pre>";
    ?>
    I am calling this from a button on another page, but I am now getting the following message:


    find: missing argument to `-exec'I am so close to what I am trying to achieve, I can taste it !

    Help greatly appreciated
    Last edited by lisati; March 23rd, 2013 at 11:34 AM. Reason: Add tags for readability

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
  •