1. von: Nikolay (Datum: 12.04.2013 05:21:38)
Hi All,I'll try this fabulous scprit.They don't work fine with the cluster name, they miss a parameter : -timeout at the end of theScript send to compressor.You had to had a -timeout 30 at the end. With it the scprit work with a Cluster Name.I let you my scprit when i'll had a llog generation with theScript command send to compressor.The fichier log.txt is create on the Destintaion Folder.(*This code is provided without copyright or warranty, by James Stuckey Weber and BacktotheEdit.com*) SECTION A Set theDestFolder to where the file should be compressed toproperty theDestFolder : /Volumes/DATAS/test-comp-auto/Out/ Set theSettingsPath to the Compressor Setting you want to useproperty theSettingsPath : /Volumes/DATAS/test-comp-auto/custom.setting Set theBatchName to what you want the batch to be called in Batch Monitorproperty theBatchName : Watch Folder Batch Set theClusterName to the name of the cluster you want to useproperty theClusterName : Cluster Set the Time Out at the end of the command. You can adjust the numeric valueproperty EndCmd : -timeout 30 SECTION Bon adding folder items to this_folder after receiving these_itemsset theScript to /Applications/Compressor.app/Contents/MacOs/Compressor -clustername & quoted form of theClusterName & -batchname & quoted form of theBatchNameset sizeA to 1set sizeB to 0 SECTION C Wait until the files are copied over to submit to Compressorrepeat while sizeA ≠sizeBset sizeA to sizeBset sizeB to 0repeat with i from 1 to number of items in these_itemsset this_item to item i of these_itemsset sizeB to sizeB + (size of (info for this_item))end repeatdelay 5end repeat SECTION D Write Command to send to shellrepeat with i from 1 to number of items in these_itemsset this_item to item i of these_itemsset theJobPath to quoted form of POSIX path of this_itemtell application Finder to set theDestFileName to (name of this_item)set theDestPath to theDestFolder & theDestFileNameset theScript to theScript & -jobpath & theJobPath & -settingpath & quoted form of theSettingsPath & -destinationpath & quoted form of theDestPath & EndCmdend repeat SECTION E Send Commanddo shell scprit theScript WRITE A LOG WITH COMMAND SENDED TO COMPRESSOR ON DESTINATIOn FOLDERopen for access theDestFolder & log.txt with write permissionwrite theScript starting at 0 to theDestFolder & log.txt set eof theDestFolder to (length of theScript)close access theDestFolderend adding folder items to_____________REGARDS 2. von: xdupqkn (Datum: 12.04.2013 18:05:23)
DbtK74 <a href="http://tydmubsxevya.com/">tydmubsxevya</a>
|