rejetto forum
May 25, 2012, 01:48:39 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This forum is free, you do NOT need to register to post. But you may.
PROBLEMS? QUESTIONS? CLICK HERE!
Fill the survey!
 
   Home   Help Search Login Register  
Pages: [1] 2 3
  Print  
Author Topic: How do you move a file to a new folder only after upload is complete?  (Read 4703 times)
0 Members and 1 Guest are viewing this topic.
Henry
Guest


Email
« on: May 12, 2009, 10:56:13 AM »

I'm setting up an automated Flash video conversion workstation.  Here's how it works:

1) user logs into HFS and uploads quicktime file to real folder on HFS machine.
2) on HFS machine, sorenson squeeze is watching the folder, and automatically converts the file and places it in my Wowza content folder
3) Wowza streams to fast start Flash player embedded in our web site

HOWEVER

Sorenson Squeeze wants to start converting IMMEDIATELY when it senses a quicktime file in the folder it's watching.  Thusly, it will begin to convert the quicktime before the file is done uploading, and subsequently fails.

Is there a way to enable completion moving so that i can upload to a different real folder, then have HFS automatically move the file to the Squeeze watched folder when the upload is complete?

Thanks in advance!

Henry
Logged
rejetto
Administrator
Insane programmer
*
Online Online

Italy Italy

Posts: 11831


View Profile
« Reply #1 on: May 12, 2009, 11:30:10 AM »

yes, but you will need HFS 2.3 (currently in beta)

just add this event script (ALT+F6)

[+upload completed]
{.move|%item-resource%|C:\another_folder\%item-name%.}


clearly you don't need to publish "another folder" in any way.
untested!
Logged
Caco
Tireless poster
****
Offline Offline

Italy Italy

Posts: 113


View Profile
« Reply #2 on: May 13, 2009, 09:09:46 AM »

How can i run external app on upload completion?

I would like to encode uploaded files with mencoder, like this:

hfs.events

[+upload complete]

mencoder.exe %item-folder%%item-name% -o %item-folder%/[previews]/%item-name%.flv -of lavf -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3
Logged
rejetto
Administrator
Insane programmer
*
Online Online

Italy Italy

Posts: 11831


View Profile
« Reply #3 on: May 13, 2009, 09:12:56 AM »

[+upload completed]
{.exec|mencoder.exe %item-resource% -o   etc etc etc.}
Logged
Caco
Tireless poster
****
Offline Offline

Italy Italy

Posts: 113


View Profile
« Reply #4 on: May 13, 2009, 09:58:36 AM »

Hi Rejetto, thank you for your sudden reply!  Smiley

I tried in many ways, but it didn't work.

Where should i put the file "mencoder.exe"?
Logged
Caco
Tireless poster
****
Offline Offline

Italy Italy

Posts: 113


View Profile
« Reply #5 on: May 13, 2009, 11:52:45 AM »

I even tried this:


[+upload completed]
{.move|%item-resource%|C:\another_folder\%item-name%.}


but nothing happened. It seems that my hfs #238 is ignoring my scripts at all  Huh?

I have macros enabled in my hfs config.



Logged
rejetto forum
« Reply #5 on: May 13, 2009, 11:52:45 AM »

Do you like this software? Consider even $2
 Logged
rejetto
Administrator
Insane programmer
*
Online Online

Italy Italy

Posts: 11831


View Profile
« Reply #6 on: May 14, 2009, 02:43:44 AM »

Where should i put the file "mencoder.exe"?

you can keep it where it is, and specify the path
{.exec|C:\folder\mencoder.exe etcetc.}

or you can move mencoder to the hfs.exe folder
or you can move it to any folder specified in your "path" enviroment variable. [more]

[+upload completed]
{.move|%item-resource%|C:\another_folder\%item-name%.}
but nothing happened. It seems that my hfs #238 is ignoring my scripts at all  Huh?

whoops! this is a bug in HFS.
the file is still locked when "upload completed" is run, so it cannot be moved.
i will fix this problem for next release!
Logged
Caco
Tireless poster
****
Offline Offline

Italy Italy

Posts: 113


View Profile
« Reply #7 on: May 14, 2009, 03:19:06 AM »

Yes, i've already set up hfs folder in my PATH variable.

I put notepad.exe in my C:\ folder, and set up hfs.events to launch it each time upload is completed:

[+upload completed]
{.exec|C:\notepad.exe.}

or

[+upload completed]
{.exec|C:\notepad.exe|document.txt.}

nothing happens Sad

Logged
rejetto
Administrator
Insane programmer
*
Online Online

Italy Italy

Posts: 11831


View Profile
« Reply #8 on: May 14, 2009, 06:56:45 AM »

whoops, that's another bug Cheesy
{.exec.} has been actually broken in version #232 when i introduced optional parameter "out".
at the moment it is not working without this optional parameters. it's like it is not truly "optional" Cheesy
i will fix this bug too in next release.
i hope to publish it tomorrow!

in the while, you can use this version. it should work.
{.exec|C:\notepad.exe|\boot.ini|out=xxx.}


you can post in the italian forum if you like Wink
Logged
Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1481



View Profile WWW
« Reply #9 on: May 14, 2009, 07:08:25 AM »

Quote
i will fix this bug too in next release.
i hope to publish it tomorrow!

un avant goût par mail comme d'hab Wink
Logged
Caco
Tireless poster
****
Offline Offline

Italy Italy

Posts: 113


View Profile
« Reply #10 on: May 14, 2009, 07:37:11 AM »

Quote
whoops, that's another bug  Cheesy

LOL  Grin

Quote
{.exec.} has been actually broken in version #232 when i introduced optional parameter "out".
at the moment it is not working without this optional parameters. it's like it is not truly "optional" Cheesy

I didn't find in the docs a detailed description of {.exec.}, it would be helpful for me  Wink

Quote
i will fix this bug too in next release.
i hope to publish it tomorrow!

Great news, i'll wait for the next release,then Wink

Quote
you can post in the italian forum if you like Wink

Yes, thank you, i posted here (despite of my bad english) cause this could be helpful for Henry and for other non-italian users Wink



Logged
rejetto
Administrator
Insane programmer
*
Online Online

Italy Italy

Posts: 11831


View Profile
« Reply #11 on: May 14, 2009, 09:45:58 AM »

I didn't find in the docs a detailed description of {.exec.}, it would be helpful for me  Wink

except the "out" parameter, that i'm about to add, what would you want to read there?
Logged
Caco
Tireless poster
****
Offline Offline

Italy Italy

Posts: 113


View Profile
« Reply #12 on: May 14, 2009, 09:50:23 AM »

Well, if some function has parameters, a brief description of each of them and a little example of its usage...  Tongue
Logged
rejetto
Administrator
Insane programmer
*
Online Online

Italy Italy

Posts: 11831


View Profile
« Reply #13 on: May 14, 2009, 11:46:26 AM »

at the moment every function is documented, and only 2 parameters were not documented.
now that i did it for the "out", only 1 parameter has left.
it's few months that i put examples in the docs, so only most recent functions have an example.
please, if you read the docs, report every command that you think it's not documented enough. we'll try to improve.
Logged
Caco
Tireless poster
****
Offline Offline

Italy Italy

Posts: 113


View Profile
« Reply #14 on: May 16, 2009, 05:09:20 AM »

Well, notepad.exe is an easy task to verify that .exec is working, the final goal is to pass a complex string to mencoder  Cheesy

However

[+upload completed]
{.exec|C:\notepad.exe|\boot.ini|out=xxx.}

still doesn't work for me.  Sad

How about build #239?  Cheesy
Logged
Pages: [1] 2 3
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!


Google visited last this page May 20, 2012, 09:12:00 PM