os.execute copy file works on simulator but not on phone

I am using this code to copy a sqlite database from the resources directory to the documents (it will need to be modified)

It works on the simulator but not on the phone

local resDb = system.pathForFile(“wklive_wk.sqlite”, system.ResourcesDirectory)
local docDb = system.pathForFile(“wklive_wk.sqlite”, system.DocumentsDirectory)

print (resDb)
print (docDb)

– resDb = string.gsub(resDb, “%s”, "\ ")
– docDb = string.gsub(docDb, “%s”, "\ ")

local toX = "cp -f “…resDb…” "…docDb

print (toX)

os.execute(toX)

(I’ve tried escaping the paths but doesn’t work either)

please, advice

thanks a lot
[import]uid: 9304 topic_id: 2301 reply_id: 302301[/import]