HandbreakCLI drop folder script HELP!

Im trying to get this script to work that passes a file through a drop folder, processes it with HandbreakCLI, then outputs the encoded file to a folded named "iflicks encode" in my "Movies" folder.
My problem is that I can't figure out how to modify the script to direct the file into the "iflicks encode" folder. Im sure this is a easy fix for some of the more knowledgeable users out there, help would be greatly appreciated.
on adding folder items to thisFolder after receiving theitems
with timeout of 10000000 seconds
try
--repeat the command to compress each item as an individual archive
repeat with oneItem in theitems
tell application "Finder"
--used to extract the name and location of the file
set itemProp to properties of oneItem
--where the file is
set sourceFile to quoted form of POSIX path of oneItem
--where the compressed file should end up
set destFold to "HD(Mini):Users:jaredcraig:Movies:test:"
--what the name of the file is
--set extension hidden of oneItem to true
if extension hidden of oneItem then
set itemName to displayed name of oneItem
else
set extension hidden of oneItem to true
set itemName to displayed name of oneItem
set extension hidden of oneItem to false
end if
set itemExtension to name extension of oneItem
--set itemBody to name body of oneItem
--display dialog itemExtension
set tmpFile to "conversion_output.tmp"
end tell
--display dialog destinationFile
set wasError to false
try
--Convert Movie
set ConvertMovieCmd to "nice /Applications/HandBrakeCLI -i " & sourceFile & " -o " & tmpFile & " -e x264 -b 5000 -2 -T -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 960 --strict-anamorphic -m -x cabac=0:ref=2:me=umh:b-pyramid=none:b-adapt=2:weightb=0:trellis=0:weightp=0:vbv -maxrate=9500:vbv-bufsize=9500 ;"
--display dialog ConvertMovieCmd
do shell script ConvertMovieCmd
--short pause before copy
delay 10
--Replace Original
set ReplaceOriginalCmd to "mv -f " & tmpFile & " " & destFold & "'" & itemName & ".m4v" & "'"
--display dialog ReplaceOriginalCmd
do shell script ReplaceOriginalCmd
--Tag file with green label
on error errmsg
--should conversion or copy fail display error message and continue with next file
--display dialog errmsg
--Tag file with red label
set wasError to true
end try
tell application "Finder"
if wasError then
set label index of oneItem to 2
else
set label index of oneItem to 6
end if
end tell
end repeat
on error errmsg
--should anything go wrong let the user know
display dialog errmsg
end try
end timeout
end adding folder items to

If I'm reading your post and script correctly, this is pretty trivial.
The AppleScript ultimately does its thing by invoking two shell commands - one to convert the file and the second to move the file to its ultimate desintation. Your solution lies in changing that second command.
Here's the relevant line:
set ReplaceOriginalCmd to "mv -f " & tmpFile & " " & destFold & "'" & itemName & ".m4v" & "'"
This command moves tmpFile to destFold which was previously defined as:
set destFold to "HD(Mini):Users:jaredcraig:Movies:test:"
Now that won't work (and I'm surprised it doesn't choke on you right now) because you haven't specified a UNIX-style path which uses / to delimit directories. In either case, changing this line to the desired destination directory should solve your problem, e.g.:
set destFold to quoted form of "/Users/jaredcraig/Movies/iflicks encode/"
(note you need to use 'quoted form of' since the path includes spaces which will choke most shell commands)

Similar Messages

  • Incoming email for the "Document" folder not working... it's stuck in the Drop folder, please help...

    Looks like everything set up correctly...but SharePoint won't pick up the emails in the drop folder... any ideas? Thanks a lot!
    Log Name:      Microsoft-SharePoint Products-Shared/Operational
    Source:        Microsoft-SharePoint Products-SharePoint Foundation
    Date:          2/4/2015 10:20:42 PM
    Event ID:      6871
    Task Category: E-Mail
    Level:         Information
    Keywords:      
    User:          Domain\*****
    Computer:      SP2013-Appserver.Domain.com
    Description:
    The Incoming E-Mail service has completed a batch.  The elapsed time was 00:00:00.1562499.  The service processed 5 message(s) in total.
    Errors occurred processing 5 message(s):
    Message ID:
    Message ID:
    Message ID:
    Message ID:
    Message ID:
    Thank you!

    Yep, you have the Nov CU. This is a bug with no resolution as of yet, that I'm aware of. I spoke with another
    SharePoint MVP who indicated that
    flushing the Config Cache resolved it in a scenario he saw it in.
    I can't reproduce the bug in my lab environment.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Folder script to print folder content automator

    Hi,
    I had a folder script that printed any document added to a folder and when printed, then it deleted the document.  That script help me to print from an OS 9 emulator  (SheepShaver) through OS X.
    For I don't know the reason, the folder script does not work anymore.  It could be Yosemite or my new iMac upgrade.  Find out ?  And Apple Script is far away in my mind ... so I am not really sure what is going wrong.
    I would like to have the script to print from any folder it is assigned to, instead of applying to only one folder.  Can you help ?   Here is the actual folder script:
    property myPrinter : "HP_Officejet_8500" -- Le nom exact de l'imprimante est obtenu en faisant «lpstat -p» dans terminal.
    property filesFolderName : "Nous/Documents/SheepShaver/Données/En impression" -- Déterminer le chemin du dossier contenant les fichiers à imprimer.
    property fileStamp : ""
    property theFilePath : ""
    on adding folder items to thisFolder after receiving theseItems
              -- Définir le chemin du dossier contenant les fichiers à imprimer.
              set filesFolderPath to POSIX path of (path to users folder) & filesFolderName & "/"
              -- Pour chaque fichier dans le dossier ...
              repeat with i in theseItems
                       -- ... définir les informations du fichier; ...
                       set {name:fileName, name extension:fileExt} to info for i
                       -- ... définir l'estampe du fichier (date et l'heure), ...
                       --set fileStamp to do shell script "/bin/date +'('%d-%m-%y' '%HH%MM%S')'"
                       -- ... définir le chemin du fichier, ...
                       set theFilePath to quoted form of (filesFolderPath & fileName)
                       -- ... et enfin, l'imprimer sur l'imprimante choisie.
                       do shell script "usr/bin/lpr -P " & myPrinter & space & theFilePath
                       do shell script "/bin/sleep 10"
                       -- ... détruire le fichier imprimé.
                       do shell script "/bin/rm " & theFilePath
                       get theFilePath
              end repeat
    end adding folder items to
    Thanks in advance.
    Robert Lespérance

    You would think this would work, remember universal access - enable access must be on.
    tell application "System Events"
    tell application "Finder" to activate
    tell process "Finder"
    keystroke "a" using command down
    keystroke left using command down & option down
    end tell
    end tell
    The Select All works, but the collapse all doesn't
    CE Quickkey will do it with ease but that $80us a machine
    http://www.cesoft.com/products/qkx.html
    you could try the OS X scripting addition but it shareware and want money too and I don't know if it will work
    http://osaxen.com/files/extrasuites1.1.html
    Must be a free OS X scripting addition (osaxen) that does keystokes
    good luck.

  • Error when dropping a script usind dbms_recoverable_script

    Hi all, I am trying to set up streams on Oracle 11g R2 on Windows 2008 server. The streams propagation failed with an error.
    SQL> select * from dba_recoverable_script;
    SCRIPT_ID                        CREATION_ INVOKING_PACKAGE_OWNER
    INVOKING_PACKAGE               INVOKING_PROCEDURE
    INVOKING_USER                  STATUS       TOTAL_BLOCKS DONE_BLOCK_NUM
    SCRIPT_COMMENT
    9F726B92950A4DB2A76416714F134A6A 07-OCT-13 SYS
    DBMS_STREAMS_ADM               MAINTAIN_TABLES
    STRMADMIN                      ERROR                  72             23
    Now I just want to drop the script and start all over again but i get the below error? STRMADMIN user does have DBA privs, please help. Regards,
    SQL> exec dbms_recoverable_script.drop_script(script_id=> '9F726B92950A4DB2A76416714F134A6A');
    BEGIN dbms_recoverable_script.drop_script(script_id=> '9F726B92950A4DB2A76416714F134A6A'); END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00201: identifier 'DBMS_RECOVERABLE_SCRIPT.DROP_SCRIPT' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored

    Hi,
    -- replace the raw value with the one you receive
    exec dbms_recoverable_script.drop_script(TO_RAW(TO_BLOB('CB68CBC3E4264A1680AE4620CFE6CD66')));
    Please cheek this link: Morgan's Library Oracle DBMS_RECOVERABLE_SCRIPT Examples Sample Code Demos Tutorials SQL PL/SQL Streams</title>&lt…
    Thank you

  • How can I create a simple app that will automatically add folder script

    Hi! I hope I can get a little help on this.  I tried searching online and haven't found anything.
    Is there away I can make a simple "application" that will automatically add a folder script to a users folder?
    Basically I need a folder script to run but I don't want to explaint o a user how they'd have to do it in automator.
    I'd like to be able to create an application they double click.  The app tells them to select a folder then automatically runs the script.
    Does anyone have any ideas of how'd I'd do this?

    Oh I get it. Yeah I read you post on one of the other pages and didn't quite understand, but not that you say that your're makeing this for another user, it makes sence.
    So what you want to do is have the computer automatically install a script on a customer's computer, right?
    (I'm using "custumer" loosly; i.e. just another user)
    If that's what you'd like to do, then you'll probably have to write an actual program in Xcode, since I imagine automiticlly installing folder action scrips will be highly discuraged by Apple because it would cause a huge security hole in the OS. (You wouldn't want some random person sending you a folder action installer disgused as a regular app LOL.)
    But I will actually suggest the following, which I think will work great for your users:
    Make a regular Automator app, and drag it to your Dock. Now, have the user click and drag a bunch of photos to the application icon, and it will run the app automatically on those files.
    You could try a work flow like this:
    ask the user Are you sure?
    convert pictures
    save pictures to ConvertedPics folder
    pop up a confirmation message saying that everything was resized
    Hope this helps

  • Create Drop Folder With Drop Only

    Mini Server, Mid 2011, 2 GHz, Intel Core i7, OSX 10.9.4
    I have my server with a static ip and would like to create a password protected folder with drop only features. I tried Pure FTP software for this, what info do I need to give my client to access this folder? I tried the static ip number from outside my network, no good. Any helpful hints are appreciated.
    Thanks

    Linc, Thanks for the reply. I am attempting to make a drop folder on my server for an outside person to drop only. I am not sure exactly how best to do this. New to the server world and this type of thing. I attempted to use Pure FTP, however, I am unable to access the fold from outside my net. Looking for the correct address to access this from outside, works fine using my ip address from inside the net. I attempted using my server software, but get lost on exactly what information to use to login to this folder.

  • How to get a build definition with Online TFS and a shared drop folder

    Hi,
    We VSTS Premium license. We use online TFS as source control.
    I want to make a build definition. Use Team Explorer for the same.
    I get error message when I enter a shared path as my build drop location.
    Please find below the image showing the difference. Radio box highlighted in Red does not work and Green does. I want to use the shared drop folder option.
    Exception Message: TF270016: An error occurred publishing log files from '' to ''. Details: The network path was not found.
    I found this message in lots of posts and have tried the following - 
    1) Everyone has full access to the folder.
    2) 'NETWORK SERVICE' also has full access.
    But the above didn't work.
    Looks like this is a known one. Can you please suggest a solution?
    Appreciate the help.
    NewbieVSTSTest2013

    Hi NVT, 
    Thanks for your post.
    Yes, Chaminda is right, Hosted Build Controller not support the UNC path. You can install On-premise Build Server for your VSO Account if you want copy build output to UNC drop location. Or we suggest you select Copy build output to Source Control folder
    or Copy to server when you’re using  Host Build Controller.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Mail enabled list not picking up items from the drop folder.

    Hi all, 
    I'm sorry if this has already been addressed but my searches didn't turn up anything that helped.
    Our site has some mail enabled lists, that used to work and now do not.  Here is a list of things I've verified and done.
    1.  Verified that email reaches the drop folder.
    2.  Verified that the list accepts messages from any sender.
    3.  Verified that the incoming email address is the same as the sender.
    4.  In Central Admin verified the settings mode is set to advanced, that the SMTP mail server for incoming mail is correct, and that the e-mail drop folder is correct.
    5.  Restarted the Sharepoint 2010 Timer Service.
    6.  Restarted the IIS server that hosts the virtual SMTP Server, and restarted the IIS server hosts sharepoint.
    7.  Verified that the service account has permission to the drop folder. 
    8.  Looked through event log and found nothing.
    9.  Verified Microsoft SharePoint Foundation Incoming E-Mail is running.
    Any help would be greatly appreciated, thanks in advance!
    Update: Looking through Event Viewer an error along this line appears.
    The Incoming E-Mail service has completed a batch.  The elapsed time was 00:00:00.2808126.  The service processed
    1989 message(s) in total.
    Errors occurred processing 1989 message(s):
    Message ID:
    The message ID is always blank.

    Errors occurred processing 1989 message(s):
    Message ID: <- (assume this is repeated 1988 more times.)
    The following aliases sent more than five messages:
    [email protected] (1950 messages)
    x.x+x_=x=[email protected] (38 messages)
    This looks like it's been fixed in the June Cumulative Update. If you can't update you can also manually fix this: http://blogs.msdn.com/b/george_bethanis/archive/2012/05/25/sps2010-cannot-send-incoming-emails-to-lists-libraries.aspx
    June CU (needs to be installed with SP1) - http://support.microsoft.com/kb/2598348
    • A document library cannot receive incoming email messages when the site collection in which the document library exists is not configured by using the site
    collection quotas feature.
    My CodePlex -
    My Blog - My Twitter

  • Error creating folder /scripts and /css with 'upload to ftp host'

    We have had a website designed for us, although I personally would like to update the website as and when needed.
    During the upload to the ftp host at 82% an error message appears regarding the creation of folder /scripts and after pressing resume, another reading /css.
    Once finished the live site is a complete mess. If someone can help expalin simply what is going on and how i can fix this problem.
    Thanks
    Ben

    Refer to a similar thread here with a possible solution to the problem.
    http://forums.adobe.com/message/5082790
    Thanks,
    Vinayak

  • Not Receiving Incoming Email from Drop folder

    Hello,
    I hope that someone out there will be able to help me with this issue. I am fairly new to MOSS2007 but belive that I have configured e-mail to list correctly, I followed the steps set out by Steve Smith
    http--www.combined-knowledge.com-Downloads-How%20to%20configure%20Email%20Enabled%20Lists%20in%20Moss2007%20RTM%20using%20Exchange%202003.pdf
    The process all follows fine and when I attempt to send to a configured mail enables list I can see the mail make it to the drop folder as it should. This is where the problem occurs, it is never picked up by the Windows SharePoint Services Timer service. The e-mail's I send just sit in the drop folder and nothing is happening.
    As this is a fairly simple thing to setup there isn't a great deal of troubleshooting info out there and most of it just says check the basics like making sure that in the central administration console>Incomming Mail Settings the drop folder is specified as C:\inetpub\mailroot\drop (which it is)
    I've been through the event logs and those created by sharepoint but can't see anything that looks like an error causing this issue and nothing in the applications logs either. I'm in limbo at the moment because so far as I can see I have setup correctly, mail delivery is succesful and nothing to suggest what is causing the issue.
    I have reset the permissions on the drop folder to grant full access to the service account that runs the Windows SharePoint Services Timer service, I have even added the Windows SharePoint Services Timer service account to the domain administrators group to try and make sure its not a permissions issue.
    Any advise would be appreciated because I've ran out of idea's now!?
    Thanks in advance.
    Drew

    Hi,
    Did you select “Directory Management Service” option, if so, please make sure you configure the Central Administration application pool identity account to have the Create, delete, and manage user accounts right to the container that you specify in Active Directory.
    Did you install Exchange server 2003 in your MOSS environment? If so, you should add an SMTP connector in Exchange Server, if you don’t know how to do that, you can post your issue into the following forum:
    http://social.technet.microsoft.com/Forums/en-US/exchangesvrdeploy/threads
    Also, please check whether your configuration meet the following requirements, If not, correct them and check the effect.
    ·         The application pool account for Central Administration, the logon account for the Windows SharePoint Services Timer service, and the application pool accounts for your Web applications should have the correct permissions to the e-mail drop folder.
    ·         The domain controller running Active Directory has a Mail Exchanger (MX) entry in DNS Manager for the mail server that you plan to use for incoming e-mail.
    For more information about how to configure incoming e-mail settings, please refer to the following article:
    Configure incoming e-mail settings
    http://technet.microsoft.com/en-us/library/cc262947.aspx
    Introduction to incoming e-mail
    http://office.microsoft.com/en-us/sharepointtechnology/HA100823061033.aspx
    Demo: Configure a SharePoint Server 2007 site to receive e-mail
    http://office.microsoft.com/en-us/sharepointserver/HA102047921033.aspx?pid=CH101788401033
    Enable and configure e-mail support for a list or library
    http://office.microsoft.com/en-us/sharepointtechnology/HA100823071033.aspx?pid=CH101215271033
    Rock  Wang 
    Rock Wang– MSFT

  • Sharepoint emails struck in Drop folder

    Hi ,
    We are having shared hosting environment and host sites for multiple clients. The emails to document library does not work for one client suddenly where as for other clients it works fine with out any issue.
    The emails are struck in drop folder, i tried to recycle timerjob, checked the ULS logs and no clue.
    Any help is appreciated.
    Thanks much

    Hi,
    According to your description, the emails to document library struck in drop folder in one clients.
    I have done a test in my SharePoint 2013 and I can't reproduced your issue.
    For your issue, try to do the following:
    Check the Incoming E-Mail Settings. changed in Configure Incoming E-Mail Settings->Settings mode to
    ADVANCED and specified E-mail drop folder Path :c:\inetpub\mailroot\drop.
    Check the Locks and the quotas and make a quota anyway that bigger than your current usage.
    Go to SharePoint Central Admin > Application Management > Configure Quota and Locks->make a quota that bigger than your current usage.
    Here are similar issue posts, you can use as a reference:
    http://sharepoint.stackexchange.com/questions/13253/incoming-mail-just-sits-in-the-drop-folder
    https://social.technet.microsoft.com/Forums/sharepoint/en-US/a82e1a6f-4184-4815-9f46-4009a5341bfd/incoming-email-stuck-in-drop-folder-after-sphotfix-installation
    http://bernado-nguyen-hoan.com/2013/06/18/solving-sharepoint-2013-incoming-mails-stuck-in-drop-folder/
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • I'm trying to organize my movies with folders.  When I click "new folder", it either doesn't add any folder or adds a new folder as a "subfolder" of an existing folder.  Help!

    I'm trying to organize my movies with folders.  When I click "new folder", it either doesn't add any folder or adds a new folder as a "subfolder" of an existing folder.  Help!

    Thank you for the suggestion - I tried it but still didn't work.  When I click "New Folder" it gives me the pop-up to name the new folder, but doesn't put a new folder anywhere in my Project Library.

  • ViewNotify service is not parsing XML from View Drop folder

    Hi,
    The view drop folder has now 2200 odd XML files which were not parsed from sometime now. We took a backup of this folder and started processing files one by one.
    We had to restart the Service after sometime , the processing time is  not uniform it ranges from 10 sec to 600 sec for one file. When parsing in bulk , sometime parsing 5 in batch is successful whereas at times it does not parse in batches.
    Any suggestion on the available utility to automate the process where one file is parsed and then service is restarted.
    Regards,
    Siddharth

    Hi Siddharth,
    This post is specific for Project Server questions and answer. Please re post your query in corresponding forum.
    Thanks and let me know in case have any doubts or I am wrong in my understanding.
    Sachin Vashishth MCTS

  • Finder Files/Folder arrangements: Help Needed!

    Hi,
    I'm relatively new to Mac and I would like to know how you can set Finder to automatically view all files / folders in order of name? without having to change the view of each individual folder
    Any help would be appreciated!
    Regards,
    Ollie

    I think I can answer your question. I just upgraded from Leopard to Snow Leopard and encountered a similar problem. I think I've found a solution.
    After upgrading to Snow Leopard, I noticed that when I used "Icon View" in Finder (which is how I've always used Finder), the icons were completely scrambled and were dispersed randomly all over the window, like a deck of cards strewn on the floor. Some icons were even overlapping other icons. The solution I finally found was to open a finder window, then navigate to any folder in my user account, then right click in a blank area inside the window, then select "Show View Options" from the dropdown menu. This brings up a small preferences pane. Then go to the "Arrange By" dropdown menu in the pane. Then select "Name" from that menu. Then click on the "Use as Defaults" button at the bottom of the pane. Then close the pane. That seemed to work for finder windows. For the Desktop, I got the same results by right-clicking on an empty space on the Desktop and following the same procedure, except that you won't need to click the "Use as Defaults" button at the bottom of the preferences pane for the Desktop, because there is no such button. These simple steps seemed to do the trick. If you have multiple user accounts on your Mac, you may need to repeat these steps for each user account.
    Incidentally, I should mention that before I discovered this solution I called AppleCare support and they told me the only thing I could do was to navigate to each individual folder on my Mac and right-click inside the Finder window for that folder and select "Arrange by Name". The guy who was helping me talked to someone above him in the AppleCare hierarchy who said exactly the same thing. Both of these people said that there was no way to universally change the Finder settings for icon arrangement. They said I had to do it folder-by-folder, for all the thousands of folders on my Mac. I was ready to revert to Leopard, but decided to experiment for a few minutes to see whether I could find a solution. That's how I came up with the solution outlined above.

  • Gallery script help, please

    Gallery script help, please
    Hello,
    I'm new to actionscript in general, I do know a little...
    I foung a gallery script, modified many things, the images
    open fine, everything is working, but here's the thing:
    the gallery is in 3 sections, red, blue and yellow.
    I would like to know how, what, and where to put a script so
    that if a "the small red image #1" is clicked, I can load any sort
    of a movie on top of the "the BIG red image #1" or #2 or 3 and so
    on...same goes for the blue and yellow...
    If I figured things correctly on my own...the small thumbnail
    images of the gallery are not buttons, that's why I can't attach a
    movie (let's say) to them...but it is all written in script, using
    the horizontal and vertical position of the mouse to open the large
    images of the gallery...
    So, I don't know how to figure things out, to attach a
    specific movie to a specific thumbnail...
    p.s.: I think the script that controls the gallery is in
    symbol 120
    I really would appreciate the help
    Merry Christmas in advance to everyone
    Sandra
    here are all the files...
    http://www.gentro.ca/sandra_test.zip

    There's a great tutorial on kirupa...
    click
    here for link

Maybe you are looking for

  • How to increase dynamically open_cursors and session_cached_cursors

    how to increase dynamically open_cursors and session_cached_cursors for Ex. alter system open_cursors = 500

  • Is it possible to use 2 external monitors?

    Hi, My name is Joe Chaplow, and I am new to the forum. Hello all. I want to set my Macbook Pro 15inch Mid 2009 model (2.8ghz with 512 dedicated vid ram and 256 for power saver mode) up so that I use two external monitors. I want to mirror the desktop

  • Help with my garduation project

    hi every one we are 16 member in our graduation project and we will use Oracle database & asp.net in that project and i wanna to know something about how we will use oracle DB in ASP.Net Application ..?? the database will be in a remote machine to ma

  • Why can I not find my music after I brought on iTunes

    Dear all, I brought music from iTunes and I can not access it. Please let me know if you know more details about this. Many thanks, Andreea.

  • Une couleur en noir et blanc

    Bonjour, Je voudrais savoir si l'on peut garder une seule couleur sur une vidéo en noir et blanc, avec IMovie. Merci beaucoup.