Batch files

R

RBDU

Hi All! thanking anyone for a reply.

I have a few questions re Bat files in Windows XP.

1. I have a bat file called - Search.BAT. It copies a access 2003 database,
on the close of that database to a Pen drive "F drive". Works OK but at
times it causes the computer to freeze when the Bat file message is shown to
the user.

2. When the bat file window closes on click on any key to close that window,
which it does, and the user returns to the windows screen it causes a slow
response between the two. I had a response to this problem sometime ago and
was asked to enclose the search bat. Any ideas here? Here is the:

Search.Bat
...................................................................................................

cls
@echo "Now backing up Search Database, please wait....."
@echo off
copy D:\landsearch.mdb F:\
@echo "Backup now complete..."
@pause
@exit

....................................................................................................

This problem did not exist pre WXP but the company updated. I read the help
file in WXP and it appears a few things have changed re bat files. The only
thing I can think of, is in the pre XP version of windows, in the bat file I
could select, "close on exit", which I can not do now.

Regards Peter
 
P

Pegasus \(MVP\)

See below.

RBDU said:
Hi All! thanking anyone for a reply.

I have a few questions re Bat files in Windows XP.

1. I have a bat file called - Search.BAT. It copies a access 2003 database,
on the close of that database to a Pen drive "F drive". Works OK but at
times it causes the computer to freeze when the Bat file message is shown to
the user.
When you say "freeze" you probably mean "pause". This is
by design. Remove the "pause" command from your batch
file.
2. When the bat file window closes on click on any key to close that window,
which it does, and the user returns to the windows screen it causes a slow
response between the two. I had a response to this problem sometime ago and
was asked to enclose the search bat. Any ideas here? Here is the:

Search.Bat
.............................................................................
.......................

cls
@echo "Now backing up Search Database, please wait....."
@echo off
copy D:\landsearch.mdb F:\
@echo "Backup now complete..."
@pause
@exit

.............................................................................
........................

This problem did not exist pre WXP but the company updated. I read the help
file in WXP and it appears a few things have changed re bat files. The only
thing I can think of, is in the pre XP version of windows, in the bat file I
could select, "close on exit", which I can not do now.

Regards Peter

The usual way to write your batch file goes like this:

@echo off
echo Now backing up Search Database, please wait.....
copy /y D:\landsearch.mdb F:\
echo Backup now complete...
pause

If you remove the "pause" line then there will be no further
delay.
 
P

P.McCartney

Thank You

Regards Peter

Pegasus (MVP) said:
See below.


When you say "freeze" you probably mean "pause". This is
by design. Remove the "pause" command from your batch
file.


The usual way to write your batch file goes like this:

@echo off
echo Now backing up Search Database, please wait.....
copy /y D:\landsearch.mdb F:\
echo Backup now complete...
pause

If you remove the "pause" line then there will be no further
delay.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top