1
Completed

Real file rename action

Although we can work around "rename" using "move" command, it seems that "move" is creating a copy of the original file in the new name, then deleting the original. 

This is very bandwidth intensive to do on multiple large video files on an SD card (which is what I regularly have to do).

It takes ages and very inefficient. 

Would be great to have a true "rename" action that simply modify the file/directory name. 

5 replies

T

Sorry, please ignore my last comment about the file not found error. 

It was my mistake using the wrong SD card. 

Apologies. 

New version works perfectly, thank you! 

Awesome :) Thanks for testing!

T

So, when trying to rename the folder itself, I get a "not found" error... 

21.25.14/FileUtil haveAccess: test : content://com.android.externalstorage.documents/tree/primary%3ATasker wr: true ww: false ir: true iw: true

21.25.14/FileUtil haveAccess: fullPath: /storage/emulated/0/Tasker

21.25.14/FileUtil haveAccess: test : content://com.android.externalstorage.documents/tree/0000-0000%3A wr: true ww: false ir: true iw: true

21.25.14/FileUtil haveAccess: fullPath: /mnt/media_rw/0000-0000

21.25.14/FileUtil nrda: need request: /mnt/media_rw/0000-0000/DCIM/Camera01: false

21.25.14/E checkSDPath: /mnt/media_rw/0000-0000/DCIM/Camera01 useRoot: false there: true file: true dir: true

21.25.14/E Move: checkSDPath: /mnt/media_rw/0000-0000/DCIM/Camera01 useDocFile: true

21.25.14/FileUtil haveAccess: test : content://com.android.externalstorage.documents/tree/primary%3ATasker wr: true ww: false ir: true iw: true

21.25.14/FileUtil haveAccess: fullPath: /storage/emulated/0/Tasker

21.25.14/FileUtil haveAccess: test : content://com.android.externalstorage.documents/tree/0000-0000%3A wr: true ww: false ir: true iw: true

21.25.14/FileUtil haveAccess: fullPath: /mnt/media_rw/0000-0000

21.25.14/FileUtil fromFileTree: checkSDPath: /mnt/media_rw/0000-0000/DCIM/Camera01 createIntermediate: false leafMime: null

21.25.14/FileUtil try tree: content://com.android.externalstorage.documents/tree/primary%3ATasker path: /storage/emulated/0/Tasker

21.25.14/FileUtil try tree: content://com.android.externalstorage.documents/tree/0000-0000%3A path: /mnt/media_rw/0000-0000

21.25.14/FileUtil tree match: content://com.android.externalstorage.documents/tree/0000-0000%3A/document/0000-0000%3A remainder: DCIM/Camera01

21.25.14/FileUtil content://com.android.externalstorage.documents/tree/0000-0000%3A/document/0000-0000%3ADCIM: has no child Camera01 lastElem: true

21.25.14/FileUtil checkSDPath: no tree path for /mnt/media_rw/0000-0000/DCIM/Camera01 at part Camera01

21.25.14/FileUtil fromFileTree: checkSDPath: no permission granted for /mnt/media_rw/0000-0000/DCIM/Camera01

21.25.14/E Move: file not found: /mnt/media_rw/0000-0000/DCIM/Camera01.

21.25.14/E Move: checkSDPath: /mnt/media_rw/0000-0000/DCIM/Camera01 ok false

21.25.14/E result: stop task (error)

21.25.14/E Error: 1

21.25.14/MacroEdit action finished exeID 1 action no 9 code 400 status: Err next 9

T

Files are on usb otg connection. 

The scenario requires renaming multiple media files into a naming convention that's recognisable by iPhone ios import function (specifically making an Insta360 Ace Pro2 SD card look like a GoPro card).

The video files are typically around 1GB in size, which takes Tasker to the same time to rename as it does to copy. 

X-plore does it instantly but does not support automation 😒

Ok, I tried changing the way it works for USB files. (It was already directly renaming internal files).

Can you please try this version? https://drive.google.com/file/d/1UCseXuUy0gi4hryzwNbxFNdxqzBEfKAt/view?usp=sharing

T

Ok, then how does apps like X-plore do batch renaming instantly?

Same action that takes 5 minutes in Tasker takes 2 seconds in X-plore... 

Hhmm, but Tasker doesn't take 2 minutes to rename a file usually. Where exactly is the file located?

In Linux (Android runs on Linux) moving IS renaming. Check here: https://www.freecodecamp.org/news/rename-file-linux-bash-command/