Copy or Move a Folder

Copy or Move a Folder

  • 9 novembre 2007 alle 9:56 am #21296
    Zumo
    Membro

    I’m not experienced in VB programming. I need to copy all files from a folder to a USB stick. Does somebody know, how to copy a folder under WinCE ? I wrote a test script:
    Public Sub Click()Dim fso As ObjectIf RunningOnCE ThenSet fso = CreateObject(‘filectl.filesystem’)fso.CopyFile ‘SDMMC CardTest*.*’,’SDMMC CardTestCopy’ElseSet fso = CreateObject(‘Scripting.filesystemobject’)fso.CopyFile ‘D:Test*.*’,’D:TestCopy’End IfEnd Sub
    It works on PC but it doesn’t work on the Panel. I get the message ‘ActiveX Automation: server could not be found.’ Do I use a wrong filesystem name? I found this one ‘filectl.filesytem’ for WinCE. Or there is another problem with ActiveX ?
    May be you know another way how to copy or move a folder…
    My Vipa panel works with Windows CE 5.0 and Movicon V10.2.0.955 SP1.
    Thanks in advance for your support !
    Zuzana

  • 14 novembre 2007 alle 5:16 pm #21297
    Movicon69
    Partecipante

    Hello.I think that the USB kay is not called D: but its root name should be HardDisk. Try to explore the panel with ActiveSync without the USB key then put it in and find a new folder appears: that’s the root name.

  • 14 novembre 2007 alle 6:16 pm #21298
    Zumo
    Membro

    Hi,thanks for your remark. I only mentioned the USB stick in my text to explain the main reason for this topic. You are right that the name of the USB stick is ‘Harddisk’ on the panel. However, there is no problem with it. The problem is that WinCE doesn’t recognise the object fso.
    My script is only an example and should copy the folder ‘Test’ to the folder ‘TestCopy’ (if the project is running on TP the both folders are on SDMMC Card, if it is running on PC the both folders are on D:).
    Bye,Zuzana

  • 15 novembre 2007 alle 8:58 am #21299
    Hans
    Membro

    Hi, frequently happens that objects on a desktop environment have different class name, or do not exist at all, on a CE platform, depending on the image created by the manufacturer.
    Anyway, there’s a bit more complicate way to do the same, using the basic function to manage files. Looking at the help on line of the basic, you’ll find a group of function for the files and folder management.for example:FileCopy ‘Storage Card est_ umber1.tr’,’Storage Cardack umber1.tr’works on a CE panel.The bad is that you can’t use *.*, so you yhave to use Dir to enumerate all the files and folder and make a loop to copy all the items…
    Bye

  • 15 novembre 2007 alle 9:47 am #21300
    Zumo
    Membro

    Hi, Hans, thank you for your advice. I didn’t come to the idea to enumerate all the files first by using Dir!
    Bye
    Zuzana

  • 12 maggio 2019 alle 11:55 am #32361
    Asperna
    Partecipante

    You can get the all details that how you can copy this or move the all formats on it this was good to get the data. I need to share this details with others so I post this to https://newtheory.com/easy-freelance-work-for-students/ this was belong to me or it have many more useful articles on it.

  • 15 maggio 2019 alle 3:14 pm #32370
    Brian_73
    Partecipante

    Hi
    Thanks!

Devi essere loggato per rispondere a questa discussione.