Devv Active Member Licensed User Longtime User Sep 28, 2014 #1 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: Sep 28, 2014
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 ?
M Mahares Expert Licensed User Longtime User Sep 29, 2014 #2 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
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)
Erel B4X founder Staff member Licensed User Longtime User Sep 29, 2014 #3 If it doesn't work then you need to pass the two StringBuilers and check their values. Upvote 0