Help with copying files

andersn45

New member
Hi guys. I'm new at this and just created a local backup macro which works but that I need help with refining.

I want to backup 3 folders from my phone's primary memory to a second sdcard permanently inserted in the same phone. The macro I created seems to work fine.

But it would be nice if I could constrain the file copying to only happen if the copied file was newer than the one at the destination or if that file did not exist (that means is new) at the target location. But I can find nothing in Macrodroid that can configure that.

Can someone help? Thank you.Screenshot_20210526-082235.png
 

andersn45

New member
Thank you for referring me to

Not being adept at Linux I'm unfortunately still not able to find what I need to modify the cp command. That is because I'm not searching to copy files modified by a certain date since for my purposes that changes weekly.

I need to filter the files to be copied to those newer than the same files in the target directory. That can easily be done in the Windows copy command but I can't find the equivalent modifyer in the linux cp command. I'm sure Linux can do it but I do not know how.
 

Jacob L

Moderator (Lawsonator)
it's not necessarily cp command that you want to modify. It is the ls ones. You should use the link to show you the commands for finding most recent modified files. Youll need to use the commands to check each of the files. Then use variable = operator or others to help you compare the values. cp is the copy command that won't change much.
 
Top