Bug? Bug with copy?

JJM

Active Member
Licensed User
Longtime User
Hello,
If I want to rename, for example, a photo, I must do that in 4 times instead in twice:
file.copy(dir1,oldname,dirtemp,newname)
file.delete(dir1.oldname)
file.copy(dirtemp.newname,dirT.newname)
file.delete(dirtemp.newname)

If I write
file.copy(dir1,oldname,dirT.newname)
file.delete(dir1.oldname)
I get a Java error that says 'dir1 oldname not exist' ??!!

Is-it normal?
Thanks a lot
JJ M
 

JJM

Active Member
Licensed User
Longtime User
In my post I wrote :
'If I write
file.copy(dir1,oldname,dirT.newname)
file.delete(dir1.oldname)
I get a Java error that says 'dir1 oldname not exist' ??!!'

You must read 'file.copy(dir1,oldname,dir1.newname)......'

and the line which raises error is file.copy(dir1,oldname,dir1,newname)

JJM
 
Last edited:

JJM

Active Member
Licensed User
Longtime User
I send you a small project.
Thank you
JJM
 

Attachments

  • rename.zip
    7.1 KB · Views: 163

JJM

Active Member
Licensed User
Longtime User
a HTC Desire S (Android 2.3.5) , but it's fine with my Samsung Tab3 7 (android 4.1.2)
Is-it a problem with android version?
 

JJM

Active Member
Licensed User
Longtime User
I have writen this program 1 year before with B4A version 2.4 and it was fine.
 
Top