I'm still totally lost trying to capture a photo via AVICAP32, so now
trying alternatives.
Using the Windows software Camera to take a photo.
All is good. It places the photo into a folder
C:\Users\Sytze\Pictures\Camera Roll
cdirs=FILETOSTR('picloc.txt')
ldirs=cdirs+"*.jpg"
lPics=ADIR(picfiles,ldirs)
trcask350 =cdirs+picfiles(1,1) &&Yes, it now knows the picture
trcask351 =Sys(5)+Curdir()+"PICS\"+Alltrim(Str(matties.code))+"_PHOTO.JPG"
**all is good at this stage
COPY FILE (trcask350) TO (trcask351)
Here's the problem
The file in the 2nd location is a zero byte file
Can anyone suggest why this is so?
--
Kind regards,
Sytze de Boer
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAG1nNy-EgTUsgEixzc5GhmseE3iE9XmzPguNqjVatzuJXSTTaA@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
The source file could be open. You can try getting an FLOCK before you attempt your copy. You also might want to look into using the Windows API to copy the file instead of the old xBase COPY FILE command.
--
rk
-----Original Message-----
From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Sytze de Boer
Sent: Wednesday, December 07, 2016 6:43 PM
To: profoxtech@leafe.com
Subject: Photo capture
I'm still totally lost trying to capture a photo via AVICAP32, so now
trying alternatives.
Using the Windows software Camera to take a photo.
All is good. It places the photo into a folder
C:\Users\Sytze\Pictures\Camera Roll
cdirs=FILETOSTR('picloc.txt')
ldirs=cdirs+"*.jpg"
lPics=ADIR(picfiles,ldirs)
trcask350 =cdirs+picfiles(1,1) &&Yes, it now knows the picture
trcask351 =Sys(5)+Curdir()+"PICS\"+Alltrim(Str(matties.code))+"_PHOTO.JPG"
**all is good at this stage
COPY FILE (trcask350) TO (trcask351)
Here's the problem
The file in the 2nd location is a zero byte file
Can anyone suggest why this is so?
--
Kind regards,
Sytze de Boer
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/BN4PR10MB0913FD8CFEC49D165AE66C6CD2850@BN4PR10MB0913.namprd10.prod.outlook.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Hi Richard
I think you're on to it.
Do you have any ideas how I can try and Close the file?
(I have tried to Kill the Camera but it seems to make no difference to the
file)
On Thu, Dec 8, 2016 at 12:53 PM, Richard Kaye <rkaye@invaluable.com> wrote:
> The source file could be open. You can try getting an FLOCK before you
> attempt your copy. You also might want to look into using the Windows API
> to copy the file instead of the old xBase COPY FILE command.
>
> --
>
> rk
> -----Original Message-----
> From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Sytze
> de Boer
> Sent: Wednesday, December 07, 2016 6:43 PM
> To: profoxtech@leafe.com
> Subject: Photo capture
>
> I'm still totally lost trying to capture a photo via AVICAP32, so now
> trying alternatives.
>
> Using the Windows software Camera to take a photo.
> All is good. It places the photo into a folder
> C:\Users\Sytze\Pictures\Camera Roll
>
> cdirs=FILETOSTR('picloc.txt')
> ldirs=cdirs+"*.jpg"
> lPics=ADIR(picfiles,ldirs)
>
> trcask350 =cdirs+picfiles(1,1) &&Yes, it now knows the picture
> trcask351 =Sys(5)+Curdir()+"PICS\"+Alltrim(Str(matties.code))+"_
> PHOTO.JPG"
> **all is good at this stage
>
> COPY FILE (trcask350) TO (trcask351)
>
> Here's the problem
> The file in the 2nd location is a zero byte file
>
> Can anyone suggest why this is so?
>
>
> --
> Kind regards,
> Sytze de Boer
>
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
> text/plain (text body -- kept)
> text/html
> ---
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAG1nNy_2PHnFUAoqFuavw55fa40BcUvqh_DkWTRPqp1qkHtKHw@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
It sounds like the Camera application has the file open for exclusive access. I don't know enough to speak intelligently at this point other than to suggest you close the Camera application gracefully, as opposed to "killing" it.
--
rk
-----Original Message-----
From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Sytze de Boer
Sent: Wednesday, December 07, 2016 6:58 PM
To: profoxtech@leafe.com
Subject: Re: Photo capture
Hi Richard
I think you're on to it.
Do you have any ideas how I can try and Close the file?
(I have tried to Kill the Camera but it seems to make no difference to the
file)
On Thu, Dec 8, 2016 at 12:53 PM, Richard Kaye <rkaye@invaluable.com> wrote:
> The source file could be open. You can try getting an FLOCK before you
> attempt your copy. You also might want to look into using the Windows API
> to copy the file instead of the old xBase COPY FILE command.
>
> --
>
> rk
> -----Original Message-----
> From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Sytze
> de Boer
> Sent: Wednesday, December 07, 2016 6:43 PM
> To: profoxtech@leafe.com
> Subject: Photo capture
>
> I'm still totally lost trying to capture a photo via AVICAP32, so now
> trying alternatives.
>
> Using the Windows software Camera to take a photo.
> All is good. It places the photo into a folder
> C:\Users\Sytze\Pictures\Camera Roll
>
> cdirs=FILETOSTR('picloc.txt')
> ldirs=cdirs+"*.jpg"
> lPics=ADIR(picfiles,ldirs)
>
> trcask350 =cdirs+picfiles(1,1) &&Yes, it now knows the picture
> trcask351 =Sys(5)+Curdir()+"PICS\"+Alltrim(Str(matties.code))+"_
> PHOTO.JPG"
> **all is good at this stage
>
> COPY FILE (trcask350) TO (trcask351)
>
> Here's the problem
> The file in the 2nd location is a zero byte file
>
> Can anyone suggest why this is so?
>
>
> --
> Kind regards,
> Sytze de Boer
>
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
> text/plain (text body -- kept)
> text/html
> ---
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/BN4PR10MB0913513AA302963E8AF83219D2840@BN4PR10MB0913.namprd10.prod.outlook.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Richard, I appreciate your honesty.
I don't have any idea how to Open the Camera (From within my application)
so I have even less idea how to close it graciously.
On Thu, Dec 8, 2016 at 1:04 PM, Richard Kaye <rkaye@invaluable.com> wrote:
> It sounds like the Camera application has the file open for exclusive
> access. I don't know enough to speak intelligently at this point other than
> to suggest you close the Camera application gracefully, as opposed to
> "killing" it.
>
> --
>
> rk
> -----Original Message-----
> From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Sytze
> de Boer
> Sent: Wednesday, December 07, 2016 6:58 PM
> To: profoxtech@leafe.com
> Subject: Re: Photo capture
>
> Hi Richard
> I think you're on to it.
>
> Do you have any ideas how I can try and Close the file?
> (I have tried to Kill the Camera but it seems to make no difference to the
> file)
>
>
> On Thu, Dec 8, 2016 at 12:53 PM, Richard Kaye <rkaye@invaluable.com>
> wrote:
>
> > The source file could be open. You can try getting an FLOCK before you
> > attempt your copy. You also might want to look into using the Windows API
> > to copy the file instead of the old xBase COPY FILE command.
> >
> > --
> >
> > rk
> > -----Original Message-----
> > From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of
> Sytze
> > de Boer
> > Sent: Wednesday, December 07, 2016 6:43 PM
> > To: profoxtech@leafe.com
> > Subject: Photo capture
> >
> > I'm still totally lost trying to capture a photo via AVICAP32, so now
> > trying alternatives.
> >
> > Using the Windows software Camera to take a photo.
> > All is good. It places the photo into a folder
> > C:\Users\Sytze\Pictures\Camera Roll
> >
> > cdirs=FILETOSTR('picloc.txt')
> > ldirs=cdirs+"*.jpg"
> > lPics=ADIR(picfiles,ldirs)
> >
> > trcask350 =cdirs+picfiles(1,1) &&Yes, it now knows the picture
> > trcask351 =Sys(5)+Curdir()+"PICS\"+Alltrim(Str(matties.code))+"_
> > PHOTO.JPG"
> > **all is good at this stage
> >
> > COPY FILE (trcask350) TO (trcask351)
> >
> > Here's the problem
> > The file in the 2nd location is a zero byte file
> >
> > Can anyone suggest why this is so?
> >
> >
> > --
> > Kind regards,
> > Sytze de Boer
> >
> >
> > --- StripMime Report -- processed MIME parts ---
> > multipart/alternative
> > text/plain (text body -- kept)
> > text/html
> > ---
> >
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAG1nNy_DtdeWz_f2VexhTqLmNzij=NsRieV3L0q9UCxHi=CLQA@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
At 15:43 2016-12-07, Sytze de Boer <sytze.kiss@gmail.com> wrote:
>I'm still totally lost trying to capture a photo via AVICAP32, so now
>trying alternatives.
>
>Using the Windows software Camera to take a photo.
>All is good. It places the photo into a folder
>C:\Users\Sytze\Pictures\Camera Roll
>
>cdirs=FILETOSTR('picloc.txt')
What is the format of the file?
1) Does the file have an EOL? That would be copied to cdirs.
2) Does the file end with a backslash? If not, you could get something like
C:\PICLOC1\PICLOC2*.jpg
assigned to ldirs instead of
C:\PICLOC1\PICLOC2\*.jpg
(Note the backslash, the THIRD backslash.)
>ldirs=cdirs+"*.jpg"
>lPics=ADIR(picfiles,ldirs)
>
>trcask350 =cdirs+picfiles(1,1) &&Yes, it now knows the picture
>trcask351 =Sys(5)+Curdir()+"PICS\"+Alltrim(Str(matties.code))+"_PHOTO.JPG"
>**all is good at this stage
3) Does the pics subdirectory exist?
>COPY FILE (trcask350) TO (trcask351)
>
>Here's the problem
>The file in the 2nd location is a zero byte file
>
>Can anyone suggest why this is so?
It previously got written that way and subsequent runs have
done nothing to it? Try deleting it, and see what happens. I got
errors from your code, not a zero byte file until I corrected the three issues.
Sincerely,
Gene Wirchenko
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/5f2ae3aa8fc0c16d69ba043119d7143f@mtlp000085
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.