thank you very much - your suggestions were spoton and now its working!=0Ac=
heers=0Amichel=0A=0A----- Original Message ----=0AFrom: Freitas <casfre@...=
il.com>=0ATo: motion-user@...=0ASent: Saturday, 17 March,=
2007 3:05:45 PM=0ASubject: Re: [Motion-user] still looking for save to ftp=
solution=0A=0AHi,=0A=0A Well, I will try to help by parts.=0A=0A I=
MHO, this error=0A &: /home/michel/ncftpputscript: /bin/bash^M: bad interpr=
eter: No such=0Afile or directory=0Acan be caused by a file edited in a Win=
dows like machine. If it is=0Atrue, you can try to use fromdos application,=
like this:=0A=0Acat yourscript | fromdos > tmp=0Acat tmp > yourscript=0Arm=
tmp=0A=0A Sure you can try to edit the script from scratch, with Linux=
.=0A=0A I would like to suggest that you use /usr/bin/ncftpput in your=
=0Ascript, just to avoid problems with PATH.=0A=0A Reading Motion Guide=
, I found this note about on_picture_save directive:=0A"Use %f for passing =
filename (with full path) to the command."=0A=0AAgain, IMHO, your script is=
not finding the file to upload so, trying=0Athe absolute path can help.=0A=
=0A I hope this help you. Let us know.=0A=0A Regards.=0A=0AFreitas=
=0A=0A---------------------------------------------------------------------=
----=0ATake Surveys. Earn Cash. Influence the Future of IT=0AJoin SourceFor=
ge.net's Techsay panel and you'll get the chance to share your=0Aopinions o=
n IT & business topics through brief surveys-and earn cash=0Ahttp://www.tec=
hsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV=0A_______=
________________________________________=0AMotion-user mailing list=0AMotio=
n-user@...=0Ahttps://lists.sourceforge.net/lists/listinfo=
/motion-user=0Ahttp://www.lavrsen.dk/twiki/bin/view/Motion/WebHome=0A=0A=0A=
=0A=0A=0A=0A=0A=09=09=0A___________________________________________________=
________ =0AAll New Yahoo! Mail =96 Tired of unwanted email come-ons? Let o=
ur SpamGuard protect you. http://uk.docs.yahoo.com/nowyoucan.html

Hi,
Well, I will try to help by parts.
IMHO, this error
&: /home/michel/ncftpputscript: /bin/bash^M: bad interpreter: No such
file or directory
can be caused by a file edited in a Windows like machine. If it is
true, you can try to use fromdos application, like this:
cat yourscript | fromdos > tmp
cat tmp > yourscript
rm tmp
Sure you can try to edit the script from scratch, with Linux.
I would like to suggest that you use /usr/bin/ncftpput in your
script, just to avoid problems with PATH.
Reading Motion Guide, I found this note about on_picture_save directive:
"Use %f for passing filename (with full path) to the command."
Again, IMHO, your script is not finding the file to upload so, trying
the absolute path can help.
I hope this help you. Let us know.
Regards.
Freitas

ok, not sure whats going on (maybe i played with the script a bit) but now the output after motion is different:
1] File of type 1 saved to: /media/PHILIPS1/motion/01-20070317141548-01.jpg
&: /home/michel/ncftpputscript: /bin/bash^M: bad interpreter: No such file or directory
[1] File of type 1 saved to: /media/PHILIPS1/motion/01-20070317141549-00.jpg
&: /home/michel/ncftpputscript: /bin/bash^M: bad interpreter: No such file or directory
[1] File of type 1 saved to: /media/PHILIPS1/motion/01-20070317141549-01.jpg
&: /home/michel/ncftpputscript: /bin/bash^M: bad interpreter: No such file or directory
[1] File of type 1 saved to: /media/PHILIPS1/motion/01-20070317141550-01.jpg
&: /home/michel/ncftpputscript: /bin/bash^M: bad interpreter: No such file or directory
[1] File of type 1 saved to: /media/PHILIPS1/motion/01-20070317141551-01.jpg
&: /home/michel/ncftpputscript: /bin/bash^M: bad interpreter: No such file or directoryin regard to you question - which ncftpput return:
/usr/bin/ncftpput
also running cdftppt from command line with sample file to same ftp site works fine
----- Original Message ----
From: Rob MacGregor <rob.macgregor@...>
To: Motion discussion list <motion-user@...>
Sent: Saturday, 17 March, 2007 1:58:49 PM
Subject: Re: [Motion-user] still looking for save to ftp solution
On 3/17/07, michel moalem <michelaccess@...> wrote:
>
> hi there and thanks for the advice
> it seems to be the solution but i cant get it to work (probably because i
> dont really know what to do beyond cut and paste...)
> anyway here is what i did:
>
> installed ncftp
> wrote a script called ncftpputscript in my home directory:
> #!/bin/bash
> FILE=${1}
>
> ncftpput -u XXXXXX -p XXXXXX web.ukonline.co.uk /temp ${FILE}
> #end of script
> /home/michel/ncftpputscript: line 3:
> : command not found
> Ok, it's not finding ncftpput. What does "which ncftpput" say?
/usr/bin/ncftpput
--
Please keep list traffic on the list.
Rob MacGregor
Whoever fights monsters should see to it that in the process he
doesn't become a monster. Friedrich Nietzsche
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Motion-user mailing list
Motion-user@...
https://lists.sourceforge.net/lists/listinfo/motion-userhttp://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
___________________________________________________________
Inbox full of unwanted email? Get leading protection and 1GB storage with All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html

On 3/17/07, michel moalem <michelaccess@...> wrote:
>
> hi there and thanks for the advice
> it seems to be the solution but i cant get it to work (probably because i
> dont really know what to do beyond cut and paste...)
> anyway here is what i did:
>
> installed ncftp
> wrote a script called ncftpputscript in my home directory:
> #!/bin/bash
> FILE=${1}
>
> ncftpput -u XXXXXX -p XXXXXX web.ukonline.co.uk /temp ${FILE}
> #end of script
> /home/michel/ncftpputscript: line 3:
> : command not found
Ok, it's not finding ncftpput. What does "which ncftpput" say?
--
Please keep list traffic on the list.
Rob MacGregor
Whoever fights monsters should see to it that in the process he
doesn't become a monster. Friedrich Nietzsche

hi there and thanks for the advice
it seems to be the solution but i cant get it to work (probably because i dont really know what to do beyond cut and paste...)
anyway here is what i did:
installed ncftp
wrote a script called ncftpputscript in my home directory:
#!/bin/bash
FILE=${1}
ncftpput -u XXXXXX -p XXXXXX web.ukonline.co.uk /temp ${FILE}
#end of script
added this line to motion.config
on_picture_save /home/michel/ncftpputscript "%v-%Y%m%d%H%M%S-snapshot"
run motion and this is the output:
[1] Started stream webcam server in port 8081
[1] File of type 1 saved to: /media/PHILIPS1/motion/01-20070317123804-01.jpg
/home/michel/ncftpputscript: line 3:
: command not found
[1] File of type 1 saved to: /media/PHILIPS1/motion/01-20070317123805-00.jpg
/home/michel/ncftpputscript: line 3:
: command not found
Cannot open local file 01-20070317123804-snapshot for reading: No such file or directory.
ncftpput 01-20070317123804-snapshot: could not open file.
[1] File of type 1 saved to: /media/PHILIPS1/motion/01-20070317123805-01.jpg
/home/michel/ncftpputscript: line 3:
: command not found
[1] File of type 1 saved to: /media/PHILIPS1/motion/01-20070317123806-00.jpg
/home/michel/ncftpputscript: line 3:
: command not found
Cannot open local file 01-20070317123805-snapshot for reading: No such file or directory.
ncftpput 01-20070317123805-snapshot: could not open file.
Cannot open local file 01-20070317123805-snapshot for reading: No such file or directory.
ncftpput 01-20070317123805-snapshot: could not open file.
[1] File of type 1 saved to: /media/PHILIPS1/motion/01-20070317123806-01.jpg
/home/michel/ncftpputscript: line 3:
: command not found
Cannot open local file 01-20070317123806-snapshot for reading: No such file or directory.
ncftpput 01-20070317123806-snapshot: could not open file.
Cannot open local file 01-20070317123806-snapshot for reading: No such file or directory.
ncftpput 01-20070317123806-snapshot: could not open file.i guess it is how i write the file name in the command but dont know how to fix it - please help if you can...
cheers
michel
----- Original Message ----
From: Rob MacGregor <rob.macgregor@...>
To: Motion discussion list <motion-user@...>
Sent: Saturday, 17 March, 2007 7:33:52 AM
Subject: Re: [Motion-user] still looking for save to ftp solution
On 3/16/07, michel moalem <michelaccess@...> wrote:
>
> hi there all... still looking for a way to save all images to remote ftp
> location.... dont know much about coding or programming but it cant be that
> difficult to execute a save to ftp command on image creation... any ideas on
> how to set up such a command are welcome
use on_movie_end/on_picture_save to call a script. The first argument
to the script will be the filename so you could do something like
(using ncftpput as Freitas suggests):
#!/bin/bash
FILE=${1}
ncftpput -uUSER -pPASS ftp.server.dom remote/dir/ ${FILE}
#end of script
--
Please keep list traffic on the list.
Rob MacGregor
Whoever fights monsters should see to it that in the process he
doesn't become a monster. Friedrich Nietzsche
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Motion-user mailing list
Motion-user@...
https://lists.sourceforge.net/lists/listinfo/motion-userhttp://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
___________________________________________________________
Copy addresses and emails from any email account to Yahoo! Mail - quick, easy and free. http://uk.docs.yahoo.com/trueswitch2.html

On 3/16/07, michel moalem <michelaccess@...> wrote:
>
> hi there all... still looking for a way to save all images to remote ftp
> location.... dont know much about coding or programming but it cant be that
> difficult to execute a save to ftp command on image creation... any ideas on
> how to set up such a command are welcome
use on_movie_end/on_picture_save to call a script. The first argument
to the script will be the filename so you could do something like
(using ncftpput as Freitas suggests):
#!/bin/bash
FILE=${1}
ncftpput -uUSER -pPASS ftp.server.dom remote/dir/ ${FILE}
#end of script
--
Please keep list traffic on the list.
Rob MacGregor
Whoever fights monsters should see to it that in the process he
doesn't become a monster. Friedrich Nietzsche