Sign in with
Sign up | Sign in
Your question

Batch file work differently on two different Windows XP in..

Last response: in Windows XP
Share
Anonymous
June 19, 2005 12:51:01 AM

Archived from groups: microsoft.public.windowsxp.newusers (More info?)

I've got two different copies of Windows XP installed on my System, one on
drive D: the other on drive F:. I've got a Batch file on drive C: that when
executed from the copy of Windows installed on drive D: copies a file
"GOLDEN.bat" from drive C: to a specific directory on drive D: When
executed from the copy of Windows installed on drive F: it should copy the
same file from drive C: to a directory with the same name on drive F:.
Typical lines of code are:

Set PathC=C:\(My Documents)\z (Documents)
Set PathD1=%SystemDrive%\Documents and Settings
Set PathD2=StartMenu\Programs\Startup
XCOPY /y "%PathC%\+Macros\Golden.bat" "%PathD1%\DJohansen\%PathD2%\*.*"

The enviornment variable "SystemDrive" is a system variable that is
automattically set to "D:" when executed from the copy of Windows on Drive
D:, and set to "F:" when executed from the copy of Windows on drive F:

I've copied the above four lines of code to a batch file which I've called
"BATCH.bat".
When executed from the copy of Windows installed on drive D: the file copy
is successfully made. When executed from drive F:, however, the system
displays an error message: "File not found - Golden.bat -", immediately
following display of the operation.

This is clearly a problem. The copy operation should be succesfull no
matter where it is executed from. Can anyone help me out?

Don J

---------------------------------------------------------------------------------
Anonymous
June 19, 2005 1:44:51 AM

Archived from groups: microsoft.public.windowsxp.newusers (More info?)

Hi,

When you are booted to the installation on F, the system, more specifically
your user profile, probably has insufficient privileges to access the PathC
files.

--
Best of Luck,

Rick Rogers, aka "Nutcase" - Microsoft MVP
http://mvp.support.microsoft.com/
Associate Expert - WindowsXP Expert Zone
www.microsoft.com/windowsxp/expertzone
Windows help - www.rickrogers.org

"Don J" <dej8800@comcast.com> wrote in message
news:UvudnUZy3erpXCnfRVn-uQ@comcast.com...
> I've got two different copies of Windows XP installed on my System, one on
> drive D: the other on drive F:. I've got a Batch file on drive C: that
> when executed from the copy of Windows installed on drive D: copies a file
> "GOLDEN.bat" from drive C: to a specific directory on drive D: When
> executed from the copy of Windows installed on drive F: it should copy the
> same file from drive C: to a directory with the same name on drive F:.
> Typical lines of code are:
>
> Set PathC=C:\(My Documents)\z (Documents)
> Set PathD1=%SystemDrive%\Documents and Settings
> Set PathD2=StartMenu\Programs\Startup
> XCOPY /y "%PathC%\+Macros\Golden.bat" "%PathD1%\DJohansen\%PathD2%\*.*"
>
> The enviornment variable "SystemDrive" is a system variable that is
> automattically set to "D:" when executed from the copy of Windows on Drive
> D:, and set to "F:" when executed from the copy of Windows on drive F:
>
> I've copied the above four lines of code to a batch file which I've called
> "BATCH.bat".
> When executed from the copy of Windows installed on drive D: the file copy
> is successfully made. When executed from drive F:, however, the system
> displays an error message: "File not found - Golden.bat -", immediately
> following display of the operation.
>
> This is clearly a problem. The copy operation should be succesfull no
> matter where it is executed from. Can anyone help me out?
>
> Don J
>
> ---------------------------------------------------------------------------------
>
>
Anonymous
June 19, 2005 2:09:37 AM

Archived from groups: microsoft.public.windowsxp.newusers (More info?)

False Alarm! Unbeknownst to me when I was working in drive F: the partition
that had originally been at drive C: had been moved to drive K: I've
noticed that this happens sometimes when you install a second copy of
Windows with a second hard disk present.
Sorry!!!

Don J

---------------------------------------------------------------------------


"Don J" <dej8800@comcast.com> wrote in message
news:UvudnUZy3erpXCnfRVn-uQ@comcast.com...
> I've got two different copies of Windows XP installed on my System, one on
> drive D: the other on drive F:. I've got a Batch file on drive C: that
> when executed from the copy of Windows installed on drive D: copies a file
> "GOLDEN.bat" from drive C: to a specific directory on drive D: When
> executed from the copy of Windows installed on drive F: it should copy the
> same file from drive C: to a directory with the same name on drive F:.
> Typical lines of code are:
>
> Set PathC=C:\(My Documents)\z (Documents)
> Set PathD1=%SystemDrive%\Documents and Settings
> Set PathD2=StartMenu\Programs\Startup
> XCOPY /y "%PathC%\+Macros\Golden.bat" "%PathD1%\DJohansen\%PathD2%\*.*"
>
> The enviornment variable "SystemDrive" is a system variable that is
> automattically set to "D:" when executed from the copy of Windows on Drive
> D:, and set to "F:" when executed from the copy of Windows on drive F:
>
> I've copied the above four lines of code to a batch file which I've called
> "BATCH.bat".
> When executed from the copy of Windows installed on drive D: the file copy
> is successfully made. When executed from drive F:, however, the system
> displays an error message: "File not found - Golden.bat -", immediately
> following display of the operation.
>
> This is clearly a problem. The copy operation should be succesfull no
> matter where it is executed from. Can anyone help me out?
>
> Don J
>
> ---------------------------------------------------------------------------------
>
>
Related resources
Anonymous
June 19, 2005 9:35:11 AM

Archived from groups: microsoft.public.windowsxp.newusers (More info?)

test
"Rick "Nutcase" Rogers" <rick@mvps.org> schrieb im Newsbeitrag
news:%23jEo$BHdFHA.3880@tk2msftngp13.phx.gbl...
> Hi,
>
> When you are booted to the installation on F, the system, more
specifically
> your user profile, probably has insufficient privileges to access the
PathC
> files.
>
> --
> Best of Luck,
>
> Rick Rogers, aka "Nutcase" - Microsoft MVP
> http://mvp.support.microsoft.com/
> Associate Expert - WindowsXP Expert Zone
> www.microsoft.com/windowsxp/expertzone
> Windows help - www.rickrogers.org
>
> "Don J" <dej8800@comcast.com> wrote in message
> news:UvudnUZy3erpXCnfRVn-uQ@comcast.com...
> > I've got two different copies of Windows XP installed on my System, one
on
> > drive D: the other on drive F:. I've got a Batch file on drive C: that
> > when executed from the copy of Windows installed on drive D: copies a
file
> > "GOLDEN.bat" from drive C: to a specific directory on drive D: When
> > executed from the copy of Windows installed on drive F: it should copy
the
> > same file from drive C: to a directory with the same name on drive F:.
> > Typical lines of code are:
> >
> > Set PathC=C:\(My Documents)\z (Documents)
> > Set PathD1=%SystemDrive%\Documents and Settings
> > Set PathD2=StartMenu\Programs\Startup
> > XCOPY /y "%PathC%\+Macros\Golden.bat" "%PathD1%\DJohansen\%PathD2%\*.*"
> >
> > The enviornment variable "SystemDrive" is a system variable that is
> > automattically set to "D:" when executed from the copy of Windows on
Drive
> > D:, and set to "F:" when executed from the copy of Windows on drive F:
> >
> > I've copied the above four lines of code to a batch file which I've
called
> > "BATCH.bat".
> > When executed from the copy of Windows installed on drive D: the file
copy
> > is successfully made. When executed from drive F:, however, the system
> > displays an error message: "File not found - Golden.bat -", immediately
> > following display of the operation.
> >
> > This is clearly a problem. The copy operation should be succesfull no
> > matter where it is executed from. Can anyone help me out?
> >
> > Don J
> >
>
> --------------------------------------------------------------------------
-------
> >
> >
>
>
Anonymous
June 19, 2005 9:35:16 AM

Archived from groups: microsoft.public.windowsxp.newusers (More info?)

test
"Don J" <dej8800@comcast.com> schrieb im Newsbeitrag
news:UvudnUZy3erpXCnfRVn-uQ@comcast.com...
> I've got two different copies of Windows XP installed on my System, one on
> drive D: the other on drive F:. I've got a Batch file on drive C: that
when
> executed from the copy of Windows installed on drive D: copies a file
> "GOLDEN.bat" from drive C: to a specific directory on drive D: When
> executed from the copy of Windows installed on drive F: it should copy the
> same file from drive C: to a directory with the same name on drive F:.
> Typical lines of code are:
>
> Set PathC=C:\(My Documents)\z (Documents)
> Set PathD1=%SystemDrive%\Documents and Settings
> Set PathD2=StartMenu\Programs\Startup
> XCOPY /y "%PathC%\+Macros\Golden.bat" "%PathD1%\DJohansen\%PathD2%\*.*"
>
> The enviornment variable "SystemDrive" is a system variable that is
> automattically set to "D:" when executed from the copy of Windows on Drive
> D:, and set to "F:" when executed from the copy of Windows on drive F:
>
> I've copied the above four lines of code to a batch file which I've called
> "BATCH.bat".
> When executed from the copy of Windows installed on drive D: the file copy
> is successfully made. When executed from drive F:, however, the system
> displays an error message: "File not found - Golden.bat -", immediately
> following display of the operation.
>
> This is clearly a problem. The copy operation should be succesfull no
> matter where it is executed from. Can anyone help me out?
>
> Don J
>
> --------------------------------------------------------------------------
-------
>
>
!