Search found 211 matches

by thefeduke
16 Aug 2017 18:11
Forum: DOS Batch Forum
Topic: Manually compressing batch files
Replies: 5
Views: 1693

Re: Manually compressing batch files

Antonio, a first line of

Code: Select all

%1cmd/v/q/c"%~F0" ::
worked for me in four less bytes, making it 287 bytes.

John A
by thefeduke
16 Aug 2017 09:47
Forum: DOS Batch Forum
Topic: How to open a CMD Window at a specified location on the Desktop?
Replies: 15
Views: 7975

Re: How to open a CMD Window at a specified location on the Desktop?

Thanks for the replies. When I say plugin, I mean any file that has an extension different than .bat Let me qualify that with: that are not native to Windows. I have been working successfully on your behalf in another topic. Please see post by elzooilogico (Thank you) at "commands to change Cmd...
by thefeduke
16 Aug 2017 09:16
Forum: DOS Batch Forum
Topic: commands to change CmdPrompt buffer size?
Replies: 9
Views: 2945

Re: commands to change CmdPrompt buffer size?

thefeduke wrote:Apologies to pstein if I am straying here.
Peter, I rescind my apology. It seems that I asked the right question of the right person in the best circumstances to meet my needs, and more, and hopefully your requirement.
elzooilogico wrote:Hope it helps.
This is more that everything that I asked for. It worked like a charm and I really do appreciate the resource link. I'll get lost there for a long time. I shall name my next-born script file after you. Thanks for a speedy and very valuable reply.

John A
by thefeduke
16 Aug 2017 00:34
Forum: DOS Batch Forum
Topic: commands to change CmdPrompt buffer size?
Replies: 9
Views: 2945

Re: commands to change CmdPrompt buffer size?

Apologies to pstein if I am straying here. You may use powershell to change window and buffer size :setWin <columns> <lines> <buffercolumns> <bufferlines> SetLocal set "psCmd=powershell -Command "$host=get-host;$win=$host.ui.rawui;" set "psCmd=%pscmd%$size=$win.windowsize;$size.w...
by thefeduke
15 Aug 2017 08:18
Forum: DOS Batch Forum
Topic: Using Doskey macro to run Choice
Replies: 5
Views: 1344

Re: Using Doskey macro to run Choice

I streamlined my last suggestion. Now there is no second script and you may name it anything you wish: @ECHO Off TITLE SUPER USER CD C:\Windows Color 4F @whoami /user /FO list set prompt=[Root] $p$g call Set "SuperUser=%~f0" doskey cla=Call "%SuperUser%" cla If /I "%~1."...
by thefeduke
14 Aug 2017 21:22
Forum: DOS Batch Forum
Topic: Using Doskey macro to run Choice
Replies: 5
Views: 1344

Re: Using Doskey macro to run Choice

In response to your clarification, try: @ECHO Off TITLE SUPER USER CD C:\Windows Color 4F @whoami /user /FO list set prompt=[Root] $p$g call Set "SuperUser=%~dp0Super2User.bat" doskey cla=Call "%SuperUser%" Exit /B That script can be called anything, but the way that I coded it, ...
by thefeduke
14 Aug 2017 13:05
Forum: DOS Batch Forum
Topic: How to open a CMD Window at a specified location on the Desktop?
Replies: 15
Views: 7975

Re: How to open a CMD Window at a specified location on the Desktop?

Can you please describe how you fixed it? PaperTronics I cannot say that I "fixed" anything. I am only watching behavior, now. It appears similar whether I start the script by START command, by double-click in File Explorer, by a desktop shortcut or by storing the script file on the Deskt...
by thefeduke
14 Aug 2017 01:14
Forum: DOS Batch Forum
Topic: How to open a CMD Window at a specified location on the Desktop?
Replies: 15
Views: 7975

Re: How to open a CMD Window at a specified location on the Desktop?

ShadowThief wrote:Try changing the [1] to [0].
I did not want to leave this hanging. Eventually, I refreshed my copy of your code.
After a phase of sometimes getting a display of false,false and true,true with unpredictable results, it seems to be behaving and even worked from the started prompt.

John A.
by thefeduke
13 Aug 2017 15:10
Forum: DOS Batch Forum
Topic: How to open a CMD Window at a specified location on the Desktop?
Replies: 15
Views: 7975

Re: How to open a CMD Window at a specified location on the Desktop?

# You wouldn't ordinarily need the [1], but running the script inherently opens a window, # and you want to do things with the window that that window opens. $h = (Get-Process | where {$_.Path -eq $application_path})[1].MainWindowHandle Unfortunately, I tried, and a normal window opened, but I got ...
by thefeduke
13 Aug 2017 00:29
Forum: DOS Batch Forum
Topic: commands to change CmdPrompt buffer size?
Replies: 9
Views: 2945

Re: commands to change CmdPrompt buffer size?

So your suggested registry values seems only to be the default values. Correct choice of words. If you right-click the prompt title-bar you can choose Defaults or Properties. Defaults should match the registry. Properties should match current prompt and will change as you re-dimension the window. T...
by thefeduke
11 Aug 2017 17:27
Forum: DOS Batch Forum
Topic: commands to change CmdPrompt buffer size?
Replies: 9
Views: 2945

Re: commands to change CmdPrompt buffer size?

I have had good luck using: Echo.Refer to Post subject: ^"Cmdwiz - cmd helper tools^" by misol101 Echo.at http://www.dostips.com/forum/viewtopic.php?p=48971#p48971 Echo.for download instructions. Here is an example of use: If "%BufSw%" EQU "1" CmdWiz SetBufferSize %ScrB...
by thefeduke
11 Aug 2017 17:03
Forum: DOS Batch Forum
Topic: Is the "Select all" link failing?
Replies: 26
Views: 5416

Re: Is the "Select all" link failing?

aGerman wrote:I don't know if this is a malfunction of the forum software or rather a problem of the Chrome browser.
FWEIW, Ctrl-c updated the clipboard for me using Win7Pro-Firefox and Win10Home-Firefox but not on Win10Pro-Chrome.

John A.
by thefeduke
11 Aug 2017 15:33
Forum: DOS Batch Forum
Topic: Pushing and Popping the PATH - like PUSHD/POPD.
Replies: 2
Views: 1253

Re: Pushing and Popping the PATH - like PUSHD/POPD.

I can't confirm that. Changes of %PATH% (regardless if set by PATH or SET) are out of scope using ENDLOCAL as soon as you left the sub-environment where it was changed. Steffen Thanks for answering. I now know that most of my problems came from not forcing substitution of variables when using the P...
by thefeduke
09 Aug 2017 23:24
Forum: DOS Batch Forum
Topic: Pushing and Popping the PATH - like PUSHD/POPD.
Replies: 2
Views: 1253

Pushing and Popping the PATH - like PUSHD/POPD.

All of my previous attempts over the last couple of years to manipulate a flexible testing environment seem to have failed because the complexity of my solutions made them unmanageable. Managing the search order did not seem to be worth it. PUSHP is to the PATH as PUSHD is to the Current Directory. ...
by thefeduke
12 Jul 2017 23:22
Forum: DOS Batch Forum
Topic: Batch file required to move rars and zips by any inside file date
Replies: 9
Views: 2033

Re: Batch file required to move rars and zips by any inside file date

Was I supposed to put the 2003 date somewhere in the batch file you provided? OK Val. Let's do it that way. I edited my most recent post to add some code. You can update the year value where indicated and just open the script file. It will also still run from a DOS prompt but you and I no longer ne...