cloudy cloudy

Author Topic: move the jpg file to an archive directory or delete the file  (Read 6718 times)

0 Members and 1 Guest are viewing this topic.

Offline tamir engel

  • Posts: 96
move the jpg file to an archive directory or delete the file
« on: September 12, 2007, 07:11:38 AM »
my canon camera creates serialized filenames, ...1.jpg, ...2.jpg...

i need to move the jpg file to an archive directory or delete the file.

all the Windows scheduler that i found there are very expensive (100$).




this what "41South" executed by himself
Canon Remote Capture only serializes the number if there is an existing picture with the base file name already. To explain, I set my capture file name as webcam.jpg, if that file exists then webcam1.jpg will be created. So what I do is move the webcam.jpg file to an archive directory using a simple batch file run by Windows scheduler. I take pictures every 5 minutes and set the archive job to run every 1-2 minutes. If there is no file then the job just exits. In this way Remote Capture always saves the file as webcam.jpg so WD (or whatever you are using) knows what to look for.








Offline southfreo

  • South Freo
  • Posts: 45
  • South Fremantle, WA
    • South Fremantle Weather
Re: move the jpg file to an archive directory or delete the file
« Reply #1 on: September 12, 2007, 08:19:01 AM »
You can use a simple .cmd file to do this, This runs indefinately no need to schedule and will move the file as soon as it appears

CopyFile.CMD
-------------
@Echo oFF
:start
if exist .\file.txt GOTO :move_file
goto :END

:move_file
move file.txt somewhereelse.txt

:END
GOTO :start

If you want it to be more effecient you'll need to add SLEEP <seconds> before the GOTO :start (Sleep Utility can be downloaded from http://www.computerhope.com/dutil.htm)


Offline NorCal Dan

  • Dan - KJ6RGX
  • Posts: 10,577
  • Davis Vue/Win10
  • Ocean Park, WA.
    • Traveling RV Weather
Re: move the jpg file to an archive directory or delete the file
« Reply #2 on: September 12, 2007, 02:15:32 PM »
Clever!  Seems to be some folks buying webcams that don't do still images and this solution may help them.  Good deal.

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 28,246
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
Re: move the jpg file to an archive directory or delete the file
« Reply #3 on: September 12, 2007, 03:14:13 PM »
If you want it to be more effecient you'll need to add SLEEP <seconds> before the GOTO :start (Sleep Utility can be downloaded from http://www.computerhope.com/dutil.htm)

You do need to add the sleep delay, unless you want to give your CPU a real workout  :wink:

 

cumulus