Limit CMD processing to internal commands, safer and faster?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: Limit CMD processing to internal commands, safer and fas

#16 Post by Ed Dyreen » 25 Nov 2011 18:54

'
It's great to see someone else do all the work, and you are using jeb's appending, and you timed it and draw your conclusions, I really appreciate, thanks ben :D

ps.: I myself time by watching the clock, I'm so lazy :roll:

jeb
Expert
Posts: 967
Joined: 30 Aug 2007 08:05
Location: Germany, Bochum

Re: Limit CMD processing to internal commands, safer and fas

#17 Post by jeb » 02 Nov 2013 12:34

There is also another possible way to process the internal SET command, without disabling pathext.

Code: Select all

set "safeSet=set^ ""
call %%safeSet%% var=123"


There seems no difference in speed, wether you use safeSet or pathExt=: (the path should be still empty).

But one curious effect is that it fails when I change it to

Code: Select all

set "safeSet=set^ ^""

Then it tries to call a file named "set<space>.bat".

I can't see the reason why it depends on the second caret.

Post Reply