An incorrect Invald path error

Hewlett-packard / PAVILION
September 30, 2014 at 16:51:04
Specs: Windows Vista, Intel Pentium D 925
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. Uncle Dewey

message edited by uncledewey

See More: An incorrect Invald path error

Report •

September 30, 2014 at 21:39:18
C:\ProgramData\ should probably be C:\"ProgramData"\ as should any other folder or file name longer than 8 characters you might use.

Report •

October 1, 2014 at 01:31:53
Why are you using a DOS version of xcopy rather than the native Windows one? This probably explains why you are getting the error (as detailed in DAVEINCAPS post). But with the DOS version of xcopy I doubt that adding quotes would help; you would have to use the short version of the filenam and all the components of the path.

Far easier just to use the correct version of xcopy.

Report •

October 1, 2014 at 10:01:54
Hi My Friends,

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

Report •

Related Solutions

October 1, 2014 at 18:44:51
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.

Report •

October 2, 2014 at 16:41:18
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

Report •

October 2, 2014 at 18:20:25
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.

Report •

October 3, 2014 at 08:40:06
I just tried the command and it said "file not found--mailbox.bdb"--I'm short on time at the moment, but will take a look online as well as my old DOS book as time permits.

Thanks a mil, Uncle Dewey

Report •

October 10, 2014 at 16:05:36
I did find a few minutes to take a look and tried to have the batch file take me to the "command line" which the batch file does, but then does not follow the ensuing commands. For the moment I have a shortcut to the folder, so only need to copy/past to another location--that works but computers ought to do tasks automatically. {:-))) I'll try another day.

Thanks a bunch for your interest. Uncle Dewey

Report •

Ask Question