rejetto forum

How do you move a file to a new folder only after upload is complete?

Guest · 43 · 17606

0 Members and 1 Guest are viewing this topic.

Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
Quote
still doesn't work for me.

To be more precise it is necessary to use it in this way


[+upload completed]
{.exec|C:\notepad.exe|\boot.ini|out=#note.}
{.add to log|{.^#note.}.}



'out' is stored here into the static var #note, And then you use it as check seems to you
« Last Edit: May 16, 2009, 01:13:59 PM by mars »


Offline Caco

  • Tireless poster
  • ****
    • Posts: 113
    • View Profile
Thank you VERY much rejetto, now with #239  {.exec.} works!!!  ;D

One more thing...

%item-resource% :  C:\myfolder\mysubfolder\myfile.ext

i need a variable like this:

%item-path%      :  C:\myfolder\mysubfolder\

to pass it to {.exec.} string

does it exist?

Cause  %folder% isn't formatted properly for my needs, it hasn't drive letter and has slashes instead of backslashes ( /myfolder/mysufolder/)


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
yes, try %folder-resource%
if it doesn't work, it will {.filepath|%item-resource%.}
anyway, consider #239 has an ugly bug that will cause malfunctioning when you have a folder starting with "p", like C:\pool
i have little time at the moment.


Offline Caco

  • Tireless poster
  • ****
    • Posts: 113
    • View Profile
%folder-resource%, GREAT!  ;D

Yes i read about big trouble with that bug, for me is not a problem cause i don't have folders starting with "p", but i hope you can solve the problem with no headaches  :P



Offline mysoogal

  • Tireless poster
  • ****
    • Posts: 127
    • View Profile
pheww ! nobody told me that macro alt+f6 was for HFS 2.3 geez you guys gotta write that crap somewhere  ;D  anyways, the below event seem to be working, the real issue is there simply is no encoding taking place. i have enabled macro log but where to check this ? the log file. when i upload a video 20 mb mpeg when video upload completes cmd window popups, but there is no output for %item-name%.mp4 inside the upload directory there is no mp4. :o ???

oh is there something like - S silent run for cmd ?  :) i dont really want to even see that cmd window  ;D


Quote
[upload completed]
{.if|%item-ext%=mp3|
{.exec|C:\wamp\www\encoder\mencoder.exe '%item-resource%' -o '%item-name%.mp4' -af volume=10 -aspect 16:9 -of avi -noodml -ovc x264 -x264encopts bitrate=500:level_idc=41:bframes=3:frameref=2: nopsnr: nossim: pass=1: threads=auto -oac mp3lame -s localhost -t .}
/if.}
« Last Edit: June 19, 2009, 10:13:12 PM by Mars »


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile

Offline mysoogal

  • Tireless poster
  • ****
    • Posts: 127
    • View Profile
video.mpeg

mpgv codec

no audio

i have tested this through cmd it works but not executing right through the event HFS  ???


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
change the line

{.if|%item-ext%=mp3|

by replacing mp3 with  the correct extension file to be converted
 
probably:  {.if|%item-ext%=mpeg|
« Last Edit: June 19, 2009, 10:18:01 PM by Mars »


Offline mysoogal

  • Tireless poster
  • ****
    • Posts: 127
    • View Profile
doesnt seem to be working changing mp3 to mpeg or avi  :-\

Quote
[upload completed]
[.if|%item-ext%=mpeg|
{.exec|C:\wamp\www\encoder\mencoder.exe '%item-resource%' -o '%item-name%.ogm' -af volume=10 -aspect 16:9 -of avi -noodml -ovc x264 -x264encopts bitrate=500:level_idc=41:bframes=3:frameref=2: nopsnr: nossim: pass=1: threads=auto -oac mp3lame -s localhost -t .}
/if.}

 :'( er.... wonder why its not encoding everything seem to be alright


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
look the beginning of line with 'if' : there is a syntax error , replace [ by {


Offline mysoogal

  • Tireless poster
  • ****
    • Posts: 127
    • View Profile
still no luck now i dont see cmd window  :(

Quote
[upload completed]
{.if|%item-ext%=mpeg|.exec|C:\wamp\www\encoder\mencoder.exe '%item-resource%' -o '%item-name%.ogm' -af volume=10 -aspect 16:9 -of avi -noodml -ovc x264 -x264encopts bitrate=500:level_idc=41:bframes=3:frameref=2: nopsnr: nossim: pass=1: threads=auto -oac mp3lame -s localhost -t .}
/if.}

is there any chance of making these codes much more simple to use and understand :O

something like this, just a idea, there is alot of {}|. its so ever confuesing


< Run code >

< HFS Exec >< Upload Completed >
// takes every input from uploader ? mpeg,mp4,ogm,rm etc and feeds it through mencoder :o
< if input-Video Extension = *.*

< exec C:\wamp\www\encoder\mencoder.exe $in -o $out.ogm -af volume=10 -aspect 16:9 -of avi -noodml -ovc x264 -x264encopts bitrate=500:level_idc=41:bframes=3:frameref=2: nopsnr: nossim: pass=1: threads=auto -oac mp3lame -s localhost -t >

< End code >


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
still no luck now i dont see cmd window  :(

because you broke it

[upload completed]
{.if|%item-ext%=mpeg|{:{.exec|C:\wamp\www\encoder\mencoder.exe '%item-resource%' -o '%item-name%.ogm' -af volume=10 -aspect 16:9 -of avi -noodml -ovc x264 -x264encopts bitrate=500:level_idc=41:bframes=3:frameref=2: nopsnr: nossim: pass=1: threads=auto -oac mp3lame -s localhost -t .}
:}/if.}


i don't know if this will work, i just fixed some errors

Quote
is there any chance of making these codes much more simple to use and understand :O

there's always a way.
it's just not convenient.


Offline Caco

  • Tireless poster
  • ****
    • Posts: 113
    • View Profile
Quote
still no luck now i dont see cmd window

You have to invoke mencoder through cmd.exe, like this:

[+upload completed]
{.if|%item-ext%=mpeg|{:{.exec|cmd.exe /K C:\wamp\www\encoder\mencoder.exe ...

Optional parameter /K keeps cmd windows opened after the process is completed , so you can check for errors.



Offline mysoogal

  • Tireless poster
  • ****
    • Posts: 127
    • View Profile
Quote
still no luck now i dont see cmd window

You have to invoke mencoder through cmd.exe, like this:

[+upload completed]
{.if|%item-ext%=mpeg|{:{.exec|cmd.exe /K C:\wamp\www\encoder\mencoder.exe ...

Optional parameter /K keeps cmd windows opened after the process is completed , so you can check for errors.



ok i find the cmd in system32

so which one to use  ??? can i use these to  :-\


Quote
[upload completed]
{.if|%item-ext%=mpeg|{:{.exec|C:\wamp\www\encoder\mencoder.exe '%item-resource%' -o '%item-name%.ogm' -af volume=10 -aspect 16:9 -of avi -noodml -ovc x264 -x264encopts bitrate=500:level_idc=41:bframes=3:frameref=2: nopsnr: nossim: pass=1: threads=auto -oac mp3lame -s localhost -t .}
:}/if.}



Quote
[+upload completed]
{.if|%item-ext%=mpeg|{:{.exec|C:\WINDOWS\system32\cmd.exe /K C:\wamp\www\encoder\mencoder.exe '%item-resource%' -o '%item-name%.ogm' -af volume=10 -aspect 16:9 -of avi -noodml -ovc x264 -x264encopts bitrate=500:level_idc=41:bframes=3:frameref=2: nopsnr: nossim: pass=1: threads=auto -oac mp3lame -s localhost -t .}
:}/if.}


Offline mysoogal

  • Tireless poster
  • ****
    • Posts: 127
    • View Profile
now we getting somewhere

output cmd error

Quote
MEncoder Sherpya-SVN-r28126-4.2.5 (C) 2000-2008 MPlayer Team
CPU: Intel(R) Celeron(R) CPU          540  @ 1.86GHz (Family: 6, Model: 22, Step
ping: 1)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

File not found: ''C:\Documents'
Failed to open 'C:\Documents.
Cannot open file/device.

Exiting...

C:\Documents and Settings\SL20009\My Documents\HFS>


i used the following


Quote
[upload completed]
{.if|%item-ext%=mpeg|{:{.exec|C:\wamp\www\encoder\mencoder.exe '%item-resource%' -o '%item-name%.ogm' -af volume=10 -aspect 16:9 -of avi -noodml -ovc x264 -x264encopts bitrate=500:level_idc=41:bframes=3:frameref=2: nopsnr: nossim: pass=1: threads=auto -oac mp3lame .}
:}/if.}


[+upload completed]
{.if|%item-ext%=mpeg|{:{.exec|C:\WINDOWS\system32\cmd.exe /K C:\wamp\www\encoder\mencoder.exe '%item-resource%' -o '%item-name%.ogm' -af volume=10 -aspect 16:9 -of avi -noodml -ovc x264 -x264encopts bitrate=500:level_idc=41:bframes=3:frameref=2: nopsnr: nossim: pass=1: threads=auto -oac mp3lame .}
:}/if.}


i removed the localhost - t it gave me error about - t something like that and before this i also removed the - s thing.  :o

do any of you have a working example which you use ?