XP replacement for Bat files

  • Thread starter Thread starter AlCamp
  • Start date Start date
A

AlCamp

Hello all...
I need to set up an icon on the desktop that copies a file from a directory
on the C:\ drive to E:\ (a thumbdrive).
In the old days (and I do mean old days) I would have created a .bat file,
and then created an icon on the desktop to call that .bat file.

What can I use in Windows XP that would be a quick and easy way to set up
these small tasks? What is the XP equivalent of a .bat file?

Thanks for any assistance,
Al Camp
 
AlCamp said:
Hello all...
I need to set up an icon on the desktop that copies a file from a directory
on the C:\ drive to E:\ (a thumbdrive).
In the old days (and I do mean old days) I would have created a .bat file,
and then created an icon on the desktop to call that .bat file.

What can I use in Windows XP that would be a quick and easy way to set up
these small tasks? What is the XP equivalent of a .bat file?

Thanks for any assistance,
Al Camp

The exact same thing: create a batch file to perform the task.
Notepad would be the simplest tool to use.

--

Bruce Chambers

Help us help you:



You can have peace. Or you can have freedom. Don't ever count on having
both at once. - RAH
 
Carch said:
I'm sorry but I don't know.

Why am I not surprised?

--

Bruce Chambers

Help us help you:



You can have peace. Or you can have freedom. Don't ever count on having
both at once. - RAH
 
I need to set up an icon on the desktop that copies a file from a directory
on the C:\ drive to E:\ (a thumbdrive).
In the old days (and I do mean old days) I would have created a .bat file,
and then created an icon on the desktop to call that .bat file.

What can I use in Windows XP that would be a quick and easy way to set up
these small tasks? What is the XP equivalent of a .bat file?

Bat files still run fine in XP. There is no replacement as they are still
supported.
--
Tom Porterfield
MS-MVP Windows
http://support.telop.org

Please post all follow-ups to the newsgroup only.
 
Tom,
Well since that's my only option, then I have another problem... please
bear with me.

The following directory exists on my C:\ drive... (believe me... this
path is correct, I checked it countless times in XP Explore)
C:\Program Files\Microsoft Office\Office\XPExpress

In the DOS environment, this directory string fails on the Office
portion...
CD C:\Progra~1\Micros~1 -- works fine
CD C:\Progra~1\Micros~1\Office -- Fails with "invalid
directory"!!

Also, when I do a DIR in DOS from the C:\Progra~1\Micros~1 directory, I
don't see the "Office" directory at all...but XP Explore sees it.

What in the heck could be the problem? I don't have any weirdo
"shared/not shared"

There is an "Office11" directory along with "Office" in the Microsoft
Office directory, but that shouldn't be causing a problem.

Why can't DOS see that directory???

Thanks,
Al Camp
 
Tom,
Well since that's my only option, then I have another problem... please
bear with me.

I didn't say it was your only option. You asked what replaced batch files,
not what other options you besides batch files.
The following directory exists on my C:\ drive... (believe me... this
path is correct, I checked it countless times in XP Explore)
C:\Program Files\Microsoft Office\Office\XPExpress

In the DOS environment, this directory string fails on the Office
portion...
CD C:\Progra~1\Micros~1 -- works fine
CD C:\Progra~1\Micros~1\Office -- Fails with "invalid
directory"!!

Are you sure that is the correct short name? Open a command prompt and
navigate to the Program Files directory. To see the short names for the
long names, issue the following command:

dir /x mic*

This will output the shortname and the long name. Verify that Micros~1 is
the 8.3 alias for the Microsoft Office folder.
Also, when I do a DIR in DOS from the C:\Progra~1\Micros~1 directory, I
don't see the "Office" directory at all...but XP Explore sees it.

This adds weight to the theory that Micros~1 is not the Microsoft Office
directory but some other Microsoft directory.
What in the heck could be the problem? I don't have any weirdo
"shared/not shared"

There is an "Office11" directory along with "Office" in the Microsoft
Office directory, but that shouldn't be causing a problem.

Why can't DOS see that directory???

It's not DOS, it's a command prompt window. Batch files by default will
run under cmd.exe, not command.com. You don't need to worry about what the
8.3 alias is for a directory, the CD command supports LFN's and spaces.
Just do:

CD /D C:\Program Files\Microsoft Office\Office

Or you can also use quotes to indicate that the entire param is a
directory:

CD /D "C:\Program Files\Microsoft Office\Office"
--
Tom Porterfield
MS-MVP Windows
http://support.telop.org

Please post all follow-ups to the newsgroup only.
 
Tom,
Found the problem...
In C:\Program Files there are 6 directories where the first 8 characters
are Microsof, so my DOS
C:\Progra~1\Micros~1
was really pointing to the wrong directory
It should be C:\Progra~1\Micros~3\Office.

Pretty disappointed in XP not having a better method to do these small
tasks. I had to try Micros~1, Micros~2, Micros~3 before I was able to
discover the right syntax for the particular directory I wanted. What a
pain!!

Thanks for your help.
Al Camp
 
Tom,
Found the problem...
In C:\Program Files there are 6 directories where the first 8 characters
are Microsof, so my DOS
C:\Progra~1\Micros~1
was really pointing to the wrong directory
It should be C:\Progra~1\Micros~3\Office.

Pretty disappointed in XP not having a better method to do these small
tasks. I had to try Micros~1, Micros~2, Micros~3 before I was able to
discover the right syntax for the particular directory I wanted. What a
pain!!

There is, see my other reply. Batch files by default run under cmd.exe,
not command.com. The CD command under cmd.exe can properly interpret long
paths and paths with spaces. So no need to guess, just:

CD C:\Program Files\Microsoft Office\Office
or
CD "C:\Program Files\Microsoft Office\Office"
--
Tom Porterfield
MS-MVP Windows
http://support.telop.org

Please post all follow-ups to the newsgroup only.
 
Tom,
Well since that's my only option, then I have another problem... please
bear with me.

The following directory exists on my C:\ drive... (believe me... this
path is correct, I checked it countless times in XP Explore)
C:\Program Files\Microsoft Office\Office\XPExpress

Try putting it in quotes like below. Bottom is the news group
where the XP batch gurus hang out.

"C:\Program Files\Microsoft Office\Office\XPExpress"

alt.msdos.batch.nt
 
Tom,
I guess our posts crossed in cyberspace, but I got all information.
I tried cmd, instead of command, and that worked just fine regarding the
long names.
Knowing that cmd understands long names, and that it is the associated
program for all .bat files makes much more sense as to why XP doesn't have a
replacement "bat" app.

This whole thing got started when I put...
Copy C:\Program Files\Microsoft
Office\Office\APExpress\APExpress.mdb E:\
in a bat file on a clients machine, and ran it. It did not copy the file to
E, and the DOS window just flashed... and was gone. (too fast to read)
The client and I checked the path a dozen times, and could not find
anything misnamed or mispelled.

Tom, I think I'll have to take it from here. I need to get back to the
client's machine and give this another try. All the good info you've given
me has brought me up to speed on XP and cmd.exe and .bat files.
Thanks for hangin' with me on this problem.
I hang out on the Microsoft Access NGs if I can ever be of help to you
in that regard.

Al Camp
 
Si,
Thanks for helping out. I'll keep your suggestion in mind when I can get
back to the client's machine.
And thanks also for the tip on alt.msdos.batch.nt
Al Camp
 
Back
Top