• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help with move /delete files please.

chazey2

Member
Hi all I've been working on getting something like to work.
https://plus.google.com/u/0/112684178849886068455/posts/YH8eiZpXTSG


I know XplosiV did a solution in another post but I really wanted the auto delete to work as I have to take a lot of pictures and mail them off for work and to keep storage space from shrinking to much I have to keep deleting manually.

I can get the move to work fine it's delete the original that's the sticking point any help greatly appreciated thanks.
 
Post a screen shot of what you have in tasker already for this profile and we will see what we can come up with. (don't forget to edit any info you don't want public)
 
Thanks, well as you can see I have more or less tried the other task set up.

First I set up the two variable's 'picmove' and 'picdelete' this is my weakest area in Tasker, not even sure if I did it right. Just clicked the plus in Variable's and types the %picmove for example then pressed back to return to main screen.
In step 5 I have tried the task with the file address and both '%picmove' and '%picdelete' neither work for the delete part. Although as previously stated the moving part works fine.

I am going to bend this around and try two separate tasks one to do the moving and one to do the deleting both fired by a time context the deleting obviously a couple of minutes after the move task.
I will let you know how I get on, but in the meantime any help on the original project would be most welcome thanks.

Edit I have been testing the move part using a file explorer, I can see the moved files with in the file explorer but not in the phone gallery. Think because I have media scanner turned off?? Will investigate further.
 

Attachments

  • Screenshot_2013-08-22-19-31-51.png
    Screenshot_2013-08-22-19-31-51.png
    83.6 KB · Views: 394
A description of the task is easier to see. Post that if you can.

Are you sure you're using %Picdelete in your second list files action?

Is there a reason you're not just using the move file action? This will cut and paste the file somewhere else.
 
Thanks, well as you can see I have more or less tried the other task set up.

First I set up the two variable's 'picmove' and 'picdelete' this is my weakest area in Tasker, not even sure if I did it right. Just clicked the plus in Variable's and types the %picmove for example then pressed back to return to main screen.
In step 5 I have tried the task with the file address and both '%picmove' and '%picdelete' neither work for the delete part. Although as previously stated the moving part works fine.

I am going to bend this around and try two separate tasks one to do the moving and one to do the deleting both fired by a time context the deleting obviously a couple of minutes after the move task.
I will let you know how I get on, but in the meantime any help on the original project would be most welcome thanks.

Edit I have been testing the move part using a file explorer, I can see the moved files with in the file explorer but not in the phone gallery. Think because I have media scanner turned off?? Will investigate further.

I think you just need to force an Sdcard refresh. Either reboot your phone, mount/unmount your sdcard, or use something like Elixir 2 to place a widget on your home screen for sdcard refresh. The Tasker profile looks fine from the screen shot.
 
Also, go to steps 1,3,5 and use the magnifying glass icon to select the path needed rather than typing out /storage/sdcard0/DCIM/ etc etc when you get the the final location, LONGtap on the final folder to select it. (quick Tap on /storage/ again on /sdcard0/ then LONGtap on DCIM to select) that will neaten up the code if nothing else.

Btw, this is just moving files from one location on the internal storage to another location? Not a location on the external sdcard?
 
Thanks for your input guys, but bit confused now. Tried the move command instead of copy as soon as I read what you put I thought 'were was my brain at?' that would be the simplest way to achieve the required outcome same as cut/paste on a pc. Result Tasker throws error 'cannot rename file'

Always thought sd1 was the external card? sd and 0 being the internals.
Just connected phone to pc and put an image into the ext sd in image folder and immediately after disconnecting from the pc the image is there in the phone gallery. The sd card shows in the phone storage too. So all points to something wrong with the task.
Had tasker a while and have done many a profile that work well only trying this one as now running 4.3 rom and the camera only has internal storage.
 
I'm not sure how Android 4.3 labels the SD cards, but in 4.1.2 sdcard0 is the internal and extsdcard is the removable.

It'll probably be a case of trial and error, after each run check with your file explorer to see if you've succeeded.

Try to keep it simple, if you can get a separate task to do the deleting of the original files then that's a start.
 
The only difference I can really see, are the paths, and my variables are global (all caps) might be worth checking that out.

Screenshot_2013-08-22-23-27-40.png
 
Thanks for the help, I'm going to try later after work a complete redo using CAPS in the variables. And making double sure by simple dropping a file into the ext SD via the pc to check the label in the phone where it ends up.
I came to Android from Symbian on 4.04 and quickly rooted and installed custom Roms, quickly finding 'the one' and have stayed with it, now using 4.3 version. The labelling of the storage has always been the same SD, 0 and SD1 but that may be a feature of the Rom.
 
Thanks for the example above XplosiV obviously as you have put it there you have it working, I have tried all ways and still I get the error message 'can't copy xxxxxx is a directory' So tried copy /past from file explorer (in phone) the address of camera picture storage (taking a couple of pictures and then checking I see them in the file explorer) into the task result ,still the same errror! Arrgggghhh!
The only other thing I can think off is over the time were I have upgraded the Rom some cameras having sd storage, in my gallery they would show as camera, so I would have two 'camera' in the phone gallery one SD one internal. So I have copied out to pc all images and deleted every image from the phone for a fresh start kinda thing and will try again later.

This is bugging me, but I do like the challenge of Tasker in situations like this. I have quite a few profiles running that took a bit of working out.
 
It sounds like a path issue.

Try using the magnifying glass to select the needed path as mentioned before, if you haven't already.

Just to clarify, are the source and destination paths both on the same sd or are you going from internal to external?

You could try adding a match on the copy line, and set it to *.jpg that might stop tasker from detecting a 'directory' and concentrate on the file, possibly.
 
Just for reference, here is the first list files command screen. Something here might give you a clue. Before trying again, I would suggest deleting your variables and remaking them in all caps, then using the "luggage tag" icons to select them from within the command screen.

Screenshot_2013-08-24-07-15-25.png
 
It sounds like a path issue.

Try using the magnifying glass to select the needed path as mentioned before, if you haven't already.

Just to clarify, are the source and destination paths both on the same sd or are you going from internal to external?

You could try adding a match on the copy line, and set it to *.jpg that might stop tasker from detecting a 'directory' and concentrate on the file, possibly.

Just for reference, here is the first list files command screen. Something here might give you a clue. Before trying again, I would suggest deleting your variables and remaking them in all caps, then using the "luggage tag" icons to select them from within the command screen.

Screenshot_2013-08-24-07-15-25.png

Hi thanks for the continued help and examples, first off yes I am trying to copy the camera taken image files from internal storage to external and then have Tasker auto delete the original from the internal storage source.

I have tried all caps for the variables and select them via the 'luggage tag'
I agree this is got to be a path issue this is why I have copied out my files and deleted every image off the phone, just going to take a couple of snaps to test.
I could of course just change out the camera APK for one with SD storage but they are not as good as the 4.3 jobbie.
 
Getting frustrated now tried all ways to sort out this task. From using and tracking file paths via magnify glass in the task to using file explorer to get the path.Re enabling media scanner now to see if that's the issue although set to scan at boot and I've been rebooting to check results.
Maybe it's a 4.3 issue?
 
Not sure bud, could just be the ROM you're on
I've come to that conclusion myself lol and now chopped out the camera APK for an older with SD storage. I had the task doing one or the other copying or deleting but not together. There is no way after finding in the file exploring the correct paths and copying them into the task that it could not be the right ones. Strange but thanks for the effort to try help mate. Of to post my profiles in the 'what tasker tasks do you use' thread.

BTW Rom I'm using Jelly Bam 10 hooked up with Googy Max 1.6.8 kernel very fast/slick good battery and in all other ways a winner!
 
I believe I might have solved the issue.

Refer to post #9

Edit the copy command (line 4) so the From field is your first variable (%PICBAC) not a path!

Also, after the deleting portion, add in an empty clear variable command (no name) and all variables will be cleared unless referenced in a task.

I'll do you a new screen to clarify.
 
Right tried your new method still the same no joy!
Tell me one thing when you use the spy glass to locate the path for DCIM/images are you able to see the taken images within the folder? I'm not seeing! If I use file Explorer and copy the path same no go. If I from the file Explorer cut and paste the images to the required destination they show moved instantly on the phone gallery all very strange, even checked out if secure settings could help. This is the only task I've never been able to get working and it's giving me head ache lol
 
No, you don't see the files, it's purely to selsct the directory.

To clarify:
Tap spyglass you see root of
Tap DCIM
Longtap Camera to select

For the destination
Tap spyglass
Tap back
Tap extsdcard
Tap wherever you need to go
Then LONGtap on the final directory to select
 
Yep promise you that's what I've been trying, the seeing the files in the final path folder ie one more click on was just a check to see if your seeing them when I'm not.
One thing noticed sometimes gives error that 'thumbnail' is a directory. (internal storage puts the file there in DCIM) although I of course select the camera folder via long tap.
I've had it work a couple times but only visable via file Explorer not phone gallery even after re boot and after deleting thumb nail first.
Thanks for your help but this is gonna be trail and error and I'll just keep plugging away at it. As am gonna keep 4.3 camera as better.
 
One thing I did notice.

Read the error carefully, mine changed from an error on the copy command (after replacing the path with %PICBAC) to an error on the list command - for some reason the camera directory was being deleted along with the variables, so I just added a create command at the end of the process to create a camera directory within DCIM, and ticked continue on error so it just gets ignored. If you take new pics the directory is created anyway, which would mean the create directory command would cause a conflict and error but mines working sweet as a nut now. Good luck with yours bud.
 
Back
Top Bottom