Forum Discussion

jinglu1977's avatar
jinglu1977
Occasional Contributor
13 years ago

Is there a way to copy files from PDA to PC programmatically?

Copy some files created during the execution from PDA to PC for later use.

4 Replies

  • Hi Jing,



    No. As an alternative, you can emulate actions of copying by using Windows Explorer (you can record the needed operations). Below, is a script I recorded on my PC - it performs this task for the Pocket_PC portable device:




    Dim wndComputer
     

    Dim directUIHWND
     

    Dim folderView
     

    Set wndComputer = Sys.Process("Explorer").Window("CabinetWClass", "Computer")
     

    Set directUIHWND = wndComputer.Window("ShellTabWindowClass", "Computer").Window("DUIViewWndClassName").Window("DirectUIHWND")
     

    Call directUIHWND.Window("CtrlNotifySink", "", 5).Window("SHELLDLL_DefView", "ShellView").Window("SysListView32", "FolderView").DblClickItem("Pocket_PC", 0)
     

    Call directUIHWND.Window("CtrlNotifySink", "", 5).Window("SHELLDLL_DefView", "ShellView").Window("SysListView32", "FolderView").DblClickItem("\", "23.6 MB free of 31.4 MB")
     

    Set folderView = directUIHWND.Window("CtrlNotifySink", "", 5).Window("SHELLDLL_DefView", "ShellView").Window("SysListView32", "FolderView")
     

    Call folderView.ClickItem("pim", "5/23/2011 11:03 AM")
     

    Call folderView.ClickItemR("pim", "5/23/2011 11:03 AM")
     

    Call folderView.PopupMenu.Click("Copy")
     

    Call wndComputer.Window("WorkerW", "Navigation Bar").Window("ReBarWindow32").Window("Address Band Root").Window("msctls_progress32").Window("Breadcrumb Parent").Window("ToolbarWindow32", "Address: Computer\Pocket_PC\\").ClickItemXY("Computer", 41, 13, False)
     

    Set folderView = directUIHWND.Window("CtrlNotifySink", "", 5).Window("SHELLDLL_DefView", "ShellView").Window("SysListView32", "FolderView")
     

    Call folderView.DblClickItem("Local Disk (C:)", 0)
     

    Set folderView = directUIHWND.Window("CtrlNotifySink", "", 5).Window("SHELLDLL_DefView", "ShellView").Window("SysListView32", "FolderView")
     

    Call folderView.DblClickItem("Folder", 0)
     

    Set folderView = directUIHWND.Window("CtrlNotifySink", "", 5).Window("SHELLDLL_DefView", "ShellView").Window("SysListView32", "FolderView")
     

    Call folderView.ClickR(114, 102)
     

    Call folderView.PopupMenu.Click("Paste")
     



    Please note that the script may look different in your case, my script only demonstrates the idea.