Announcement

Collapse
No announcement yet.

Vista: shell copy failed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Vista: shell copy failed

    Hello,

    I´ve two Vista premium home Notebooks. One works - other failed doing this

    with in a PBDos.exe

    ...


    1) shell "copy c:\filiale\ll.dat c:\filiale\llok.dat"
    --> DOS-error: File not found

    If I do it manualy in the Dos-app then it works fine


    2) trying this
    shell "robocopy c:\filiale\ll.dat c:\filiale\llok.dat"
    ---> robocopy error 123 (0x0000007B) access to c:\filiale\ll.dat failed

    If I do this manualy the same error occurred.

    but the c:\filiale\ll.dat is there

    3) Using Pbwin8.0

    copyfile "c:\filiale\ll.dat","c:\filiale\llok.dat"
    ---> works file


    Thanks for help

    Matthias Kuhn
    Last edited by Matthias Kuhn; 14 Oct 2008, 05:06 PM.

  • #2
    try SHELL "CMD /C copy src target"

    Better still, write your own "copyfile" function in code. It's a little more work in PB/DOS than in Windows since you can't get more than $STRING bytes at one time, but it's still not all that hard.

    However, that 'access denied' thing suggests the file was in use or security was prohibiting access.
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      CMD /C works

      Hello Michael,

      shell "CMD /C copy src Target" works fine.

      Many thanks !!!

      Matthias Kuhn

      Comment


      • #4
        I don't know if I should be pleased about that or not.

        SHELLing to make a file copy is so, so... so Philistine.
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #5
          I agree...

          Hello Michael,

          I agree but this piece of code is about five Years old and this time it was

          the simplest and quickest and savest to do it this way.

          I vow to make it more professional in future.

          Regards

          Matthias Kuhn

          Comment


          • #6
            > vow to make it more professional in future.



            If I had a nickel - or five pfennigs, I guess - for every time I have heard, "We'll code it cheap and dirty just to get it done and we'll clean it up in the future" and that cleanup never happened, I would be wealthier than Croseus.

            MCM
            Michael Mattias
            Tal Systems (retired)
            Port Washington WI USA
            [email protected]
            http://www.talsystems.com

            Comment


            • #7
              Same file fails on different machines

              Is there by any chance a difference in user level on the 2 machines?

              Just a thought UAC is a pain, mostly.

              LEARNING EXPERIENCE: What you get when you didn't get what you THOUGHT you wanted!

              Comment

              Working...
              X