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?