Change Camera Save Folder?

470 views
Skip to first unread message

Darth Bob

unread,
Nov 18, 2011, 3:02:09 PM11/18/11
to Tasker
Is it possible to change the camera save folder using Tasker? In my
case, use my phone to make copies of receipts so that I don't have to
keep the paper copies. However, I do not like them interspersed with
my regular photographs, so what I would like to be able to do is set a
task that will change the camera folder, launch the camera, the revert
the camera folder once the camera exits.

Can this be done?

Pent

unread,
Nov 18, 2011, 3:27:21 PM11/18/11
to Tasker
More elegant is probably a widget that moves all photos from the last
hour (or whatever) to wherever your receipts go, something like:

List Files /sdcard/DCIM/Camera/, %files
For %file, %files()
Test Modified Time, %file, %mtime
Move File %file, RECEIPTSDIR If %TIMES - %mtime < 3600

In case it's useful, the last photo taken (also by the camera app) is
in %FOTO BTW. Maybe it's easier to do something with that.

Pent

Darth Bob

unread,
Nov 18, 2011, 3:46:55 PM11/18/11
to Tasker
Hmm. I think we disagree on what's more elegant, but your suggestion
is certainly workable! :-)

As for the %FOTO variable, that would be tempting, except that I'm not
certain how to work it...unless there's a camera "click" event that
Tasker can capture or it can capture when a new file is saved to the
folder...? Then I could embed the camera launch in the task (which is
what I was thinking of anyway).

Thanks for the suggestion. I'll look at it.

Darth Bob

unread,
Nov 18, 2011, 3:52:14 PM11/18/11
to Tasker
...actually, with a slight modification, I think your approach is the
best approach. Create a task that (generally speaking):

1. Timestamp when the task starts.
2. Launch the camera app.
3. Take the pictures.
4. When the camera app closes, move all files in the camera directory
created since the task starts to the target folder.

I think this should work?

On Nov 18, 2:27 pm, Pent <supp...@apps.dinglisch.net> wrote:

Darth Bob

unread,
Nov 18, 2011, 4:10:03 PM11/18/11
to Tasker
Now I'm just feeling stupid. How do I test the modified time?

Thanks.

On Nov 18, 2:27 pm, Pent <supp...@apps.dinglisch.net> wrote:

Pent

unread,
Nov 18, 2011, 5:21:02 PM11/18/11
to Tasker
> Now I'm just feeling stupid. How do I test the modified time?

Test action in the Misc category.

Pent

Darth Bob

unread,
Nov 22, 2011, 1:12:59 PM11/22/11
to Tasker
Thanks. Got it to work. I did it in two tasks, plus a profile.

Task 1: File Receipts
Variable Set %FRTIME, %TIMES
Load App Camera

Task 2: Move Receipts
If %FRTIME Is Set
Variable Set %target, /sdcard/DCIM/Receipts
Variable Set %count, 0
List Files /sdcard/DCIM/Camera, %files
For %file, %files()
Test File Modified %file, %mtime
If %mtime > %FRTIME
Move %file, %target
Variable Set %count, %count + 1
End If
End For
Flash "%count pictures moved to %target.", If %count > 0
Variable Clear %FRTIME
End If

Profile: When Camera app is launched
Start Task: File Receipts
End Task: Move Receipts

Thanks for your help!

Reply all
Reply to author
Forward
0 new messages