Back

CopyFolder

Hello World

CopyFolder copies a folder and its contents to a given destination.

app.CopyFolder( source, destination, overwrite, filter )

If an item already exists in the destination it will not be overwritten unless overwrite is true.

Note: CopyFolder(fld1, fld2) will copy the contents of fld1 to fld2.

See Also: RenameFolder, DeleteFolder, FolderExists

Example

function OnStart()
{
    app.MakeFolder("myFolder");
    app.CopyFolder("myFolder", "/sdcard/myFolder");

    if(app.FolderExists("/sdcard/myFolder"))
        app.ShowPopup("myFolder exists in /sdcard/!");
    else
        app.ShowPopup("myFolder does not exist in /sdcard/!");
}
    Copy     Copy All       Run      
Boolean
String: path to file or folder ( “/absolute/...” or “relative/...” )
String: “pattern”