Issue in execution of batch files Windows XP Pro

P

Pegasus \(MVP\)

Marco B said:
My batch program is the simplest one just a creation of folders on a
network
drive and copying a small file (1kb) from the local disc c: to the netwrk
folder just created (like the below code)

md \\<machine-name>\<shared-folder> \<new_folder>
copy c:\<test_file> \\<machine-name>\<shared-folder>\<new_folder>
......

What we noticed is that bigger is the file batch file (just placing more
text line in the batch file after the command copy) slower is the
execution.
Just changing the extension from .bat to .cmd the execution become faster.

I think you have two options:

a) Assume a pragmatic attitude: Since running your program as a .cmd file
for whatever reasons, accept it and leave it at that.

b) Satisfy your curiosity. Since it is very unlikely that Windows is the
cause of the difference, keep digging until you find the real cause.

As you see from the various replies in this thread, there are quite a few
myths surrounding .bat/.cmd files. To get down to the facts requires a bit
of time and effort which you will have to spend.
 
W

windmap

I think you have two options:

a) Assume a pragmatic attitude: Since running your program as a .cmd file
for whatever reasons, accept it and leave it at that.

b) Satisfy your curiosity. Since it is very unlikely that Windows is the
cause of the difference, keep digging until you find the real cause.

As you see from the various replies in this thread, there are quite a few
myths surrounding .bat/.cmd files. To get down to the facts requires a bit
of time and effort which you will have to spend.

You might have turned on "Scan network drives and scripts" in your
anitivirus program on the issue machine.Because i once had similiar
problem copying scripts files over the network.Because i had my
anitivirus program Mccafee enterprise set to monitor and scan network
drives.When i unchecked the feature,my issue resolved.
 
M

Marco B

Isuue solved now. The strange behaviour was rlated to the Symantec Antivirus
ver. 10.1.5. This antivirus installed a DLL making a redirector for the
TCP/IP protocol, it works even if all the services related to the Symantec
antivirus are turned off. Removing manually the cleint antivirus following
details on
http://service1.symantec.com/SUPPOR...031914291648&nsf=ent-security.nsf&view=pfdocs
solved the issue and batch execution (.bat) speed up as execution of .cmd
files.
Symantec antivirus.... not so a heartfelt product...
 
W

windmap

Isuue solved now.  The strange behaviour was rlated to the Symantec Antivirus
ver. 10.1.5.  This antivirus installed a DLL making a redirector for the
TCP/IP protocol, it works even if all the services related to the Symantec
antivirus are turned off.  Removing manually the cleint antivirus following
details onhttp://service1.symantec.com/SUPPORT/ent-security.nsf/docid/200602221...
  solved the issue and batch execution (.bat)  speed up as execution of .cmd
files.  
Symantec antivirus....  not so a heartfelt  product...

Thanks for letting us know.Marco
 
P

Pegasus \(MVP\)

Great to see that you had the will to persist. Your report adds another
black mark to the ones I already have against Symantec products.
 
P

Pegasus \(MVP\)

Bob I said:
Using the correct file type IS fixing the issue. What you are wanting is
is to avoid fixing the issue. You may be have the problem as a side effect
of a security update. What you are seeing is an opening and closing of the
file for each command. Simply correcting the extension will cause desired
behaviour.

I trust you've read the conclusion to this issue. Both .cmd and .bat are
"correct" extensions for a batch file and they are treated almost
identically by Windows. For all practical purposes you can use either under
Windows XP.
 
B

Bob I

Pegasus said:
I trust you've read the conclusion to this issue. Both .cmd and .bat are
"correct" extensions for a batch file and they are treated almost
identically by Windows. For all practical purposes you can use either under
Windows XP.

Yes, I did. I personally stick with CMD for NT operating systems, while
I use BAT on the 98 boxes.
 
P

Pegasus \(MVP\)

Bob I said:
Yes, I did. I personally stick with CMD for NT operating systems, while I
use BAT on the 98 boxes.

This is probably a good idea because it automatically tags the files as
written for NT vs. Win9x style OSs.
 
B

Bob I

Pegasus said:
This is probably a good idea because it automatically tags the files as
written for NT vs. Win9x style OSs.

BTW, while I'm thinking of it, you do write some nice batch files.
 

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

Top