Android Question shell problem

Devv

Active Member
Licensed User
Longtime User
Im trying to play with files using shell commands

i tried the following using terminal emulator

B4X:
cp /sdcard/h.jpg /sdcard/z.jpg

it worked perfectly

when i tried this code on the same device

B4X:
Dim p As Phone
Dim sb As StringBuilder

sb.Initialize
p.Shell("cp /sdcard/h.jpg /sdcard/z.jpg", Null, sb, Null)
Msgbox(sb.ToString, "Free space:")

it didn't copied the file

any ideas ?
 
Last edited:

Mahares

Expert
Licensed User
Longtime User
This code works:
B4X:
Dim p As Phone
p.Shell("cp " &  File.Combine(File.DirRootExternal,"MyLog.log") & " " & _
File.Combine(File.DirRootExternal,"HisLog.log"), Null, Null, Null)
 
Upvote 0
Top