Computing Staff
  • 2

An Incorrect Invald Path Error

  • 2

While using a batch file I get a “Invalid Path” error while using the following command:

c:\users\dewey\dos\xcopy C:\ProgramData\Juno\Isp\OER\User0000\mailbox.bdb C:\users\public\desktop

I still get the error if I remove the destination. I have also copied/pasted the address and it still fails.

I’m at a loss.

As you can see I don’t know much about using “DOS” batch files. I used the Windows xcopy command and then I get “access denied”. If I remove the destination then it asks me if I want to overwrite the file I’m trying to copy.

So,once again I need help. Thanks a mil for any guidance you can give me. Uncle Dewey

PS: Is there a Windows batch application? ud

Share

3 Answers

  1. I didn’t notice you were pulling xcopy from some folder you’d named ‘dos’. If it is a dos version I’d expect you to get an ‘incorrect dos version’ when using it. You can also try changing the ‘programdata’ to progra~1. That might work too if there aren’t other LFN’s starting with ‘progra’ that can be shortened to 8.3 format.

    Also since it’s only one file you’re copying you can just use the COPY command. instead of XCOPY.

    ACCESS DENIED might be an attribute issue or the file may be in use but still, I’d expect you to be able to copy it. It just might not allow you to move it.

    It’s not clear from your posting but between mailbox.bdb and C:\users\public\desktop there should be a single space.

    • 0
  2. Hi Dave,
    I’ll try to respond to each item in your message. Easy one first–there is a space between mailbox.bdb and C:\. I was using DOS’ xcopy, but switched to Windows xcopy. I cannot use “copy” as windows does not recognize the command. I tried shortening ProgramData, but no better success–Windows seems to think that quotes around ProgramData is okay.

    I’ve about given up on using a batch file. I made a shortcut to the location of mailbox.bdb, then I just copy and past it to the desktop, Not as automatic as I was trying–too bad Windows doesn’t offer a method to write short programs like the BAT.

    I really appreciate your interest and help!!!!!! Thanks a bunch, Uncle Dewey

    • 0
  3. What happens if you try to run it like this?:
    XCOPY “C:\Progra~1\Juno\Isp\OER\User0000\mailbox.bdb” “C:\users\public\desktop” /D /E /C /R /I /K /Y

    I don’t know much about batch files and switches but a quick look online suggested these.

    It will overwrite any previous copy if you use it more than once.

    • 0