View Full Version : how to specify a path in ms-dos
Bob Coletti
December 5th 03, 09:31 PM
I am a new XP user. I am trying to write a simple batch
program in Ms-dos to back-up key files on my hard drive
to a CD via a CD writer. Under the Windows 98 operating
system, I have to use the MS-dos folder and file names
when specifying the path. I find the ms-dos names by
going into windows explorer and right clicking on each
element of the path and checking properties for the
name. In XP, there doesn't seem to be ms-dos names. Is
this the case. Do I just specify the path with the
windows names as they appear.
As an example, the folder My Documents in Windows 98 has
a dos name mydocu~1. There appears to be no such name in
XP.
An example of a line of code which would work for me
in '98 but is not working in XP is:
xcopy c:\mydocu~1\*.* e:\mydocu~1\*.* /s
Even if I use the regular windows names, I can't seem to
get the system to accept this command line. Can anyone
give me any advice on this.
again, I am just trying to back-up key folders and files
from my hard drive. I have always done that via these
simple batch files. Thanks
Rod Farmer
December 5th 03, 09:31 PM
Probably because there is no 'real' DOS in XP. There may be other ways to
achieve this but unknown to myself.
"Bob Coletti" > wrote in message
...
> I am a new XP user. I am trying to write a simple batch
> program in Ms-dos to back-up key files on my hard drive
> to a CD via a CD writer. Under the Windows 98 operating
> system, I have to use the MS-dos folder and file names
> when specifying the path. I find the ms-dos names by
> going into windows explorer and right clicking on each
> element of the path and checking properties for the
> name. In XP, there doesn't seem to be ms-dos names. Is
> this the case. Do I just specify the path with the
> windows names as they appear.
>
> As an example, the folder My Documents in Windows 98 has
> a dos name mydocu~1. There appears to be no such name in
> XP.
>
> An example of a line of code which would work for me
> in '98 but is not working in XP is:
>
> xcopy c:\mydocu~1\*.* e:\mydocu~1\*.* /s
>
> Even if I use the regular windows names, I can't seem to
> get the system to accept this command line. Can anyone
> give me any advice on this.
> again, I am just trying to back-up key folders and files
> from my hard drive. I have always done that via these
> simple batch files. Thanks
Doug Knox MS-MVP
December 5th 03, 09:32 PM
Bob,
You would use the full path to the folder, enclosing it in quotes if it has
spaces in it.
Also, leave off the *.* on the second part of the command, it isn't
necessary.
XCOPY "C:\Documents and Settings\Doug\Desktop\*.*" "E:\Documents and
Settings\Doug\Desktop" /s /I
The I switch gets rid of the Is it a file or directory prompt.
--
Doug Knox, MS-MVP Windows XP/ Windows Smart Display
Win 95/98/Me/XP Tweaks and Fixes
http://www.dougknox.com
--------------------------------
Associate Expert
ExpertZone - http://www.microsoft.com/windowsxp/expertzone
--------------------------------
Please reply only to the newsgroup so all may benefit.
Unsolicited e-mail is not answered.
"Bob Coletti" > wrote in message
...
> I am a new XP user. I am trying to write a simple batch
> program in Ms-dos to back-up key files on my hard drive
> to a CD via a CD writer. Under the Windows 98 operating
> system, I have to use the MS-dos folder and file names
> when specifying the path. I find the ms-dos names by
> going into windows explorer and right clicking on each
> element of the path and checking properties for the
> name. In XP, there doesn't seem to be ms-dos names. Is
> this the case. Do I just specify the path with the
> windows names as they appear.
>
> As an example, the folder My Documents in Windows 98 has
> a dos name mydocu~1. There appears to be no such name in
> XP.
>
> An example of a line of code which would work for me
> in '98 but is not working in XP is:
>
> xcopy c:\mydocu~1\*.* e:\mydocu~1\*.* /s
>
> Even if I use the regular windows names, I can't seem to
> get the system to accept this command line. Can anyone
> give me any advice on this.
> again, I am just trying to back-up key folders and files
> from my hard drive. I have always done that via these
> simple batch files. Thanks
vBulletin® v3.6.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.