Search found 905 matches

by ShadowThief
19 Sep 2019 19:32
Forum: DOS Batch Forum
Topic: how to check file exists or not : batch script
Replies: 1
Views: 25

Re: how to check file exists or not : batch script

Code: Select all

If exist file.txt (
    echo File exists
) else (
     echo File does not exist
 )
by ShadowThief
17 Sep 2019 10:46
Forum: DOS Batch Forum
Topic: press no on external msgbox with yesno option
Replies: 2
Views: 88

Re: press no on external msgbox with yesno option

You can't use batch to interact with GUIs.
by ShadowThief
17 Sep 2019 10:37
Forum: DOS Batch Forum
Topic: Looking for a specific book
Replies: 16
Views: 514

Re: Looking for a specific book

I don't know why you're so set on this particular book. There are no books about advanced modern batch techniques (you'll get some about advanced DOS, but that won't help you in 2019) and there are certainly no upcoming books about batch, since pretty much everybody has moved on to PowerShell. If yo...
by ShadowThief
16 Sep 2019 21:10
Forum: DOS Batch Forum
Topic: Wait Process Window to be Activate
Replies: 4
Views: 93

Re: Wait Process Window to be Activate

I take it to mean "has keyboard focus"
by ShadowThief
16 Sep 2019 10:22
Forum: DOS Batch Forum
Topic: Wait Process Window to be Activate
Replies: 4
Views: 93

Re: Wait Process Window to be Activate

I think they mean they want to wait for the window to be active
by ShadowThief
08 Sep 2019 10:08
Forum: DOS Batch Forum
Topic: Looking for a specific book
Replies: 16
Views: 514

Re: Looking for a specific book

No editor on the planet worth their salt would allow a title with the phrase "Advanced Learning;" it simply isn't grammatical. Possibilities in case the book wasn't red: Advanced Batch File Programming Batchography: The Art of Batch Files Programming (this is the only batch book that I'm aware of th...
by ShadowThief
06 Sep 2019 07:49
Forum: DOS Batch Forum
Topic: Looking for a specific book
Replies: 16
Views: 514

Re: Looking for a specific book

Possibilities assuming your brain autocorrected "DOS" to "batch": A Concise Introduction to DOS Undocumented DOS: A Programmer's Guide to Reserved MS-DOS Functions and Data Structures Peter Norton's DOS Guide Possibilities assuming you got the languages wrong entirely: Microsoft PowerShell, VBScript...
by ShadowThief
06 Sep 2019 07:32
Forum: DOS Batch Forum
Topic: Looking for a specific book
Replies: 16
Views: 514

Re: Looking for a specific book

What year did you read this book in? What language was it in? What country were you in?
by ShadowThief
27 Aug 2019 05:29
Forum: DOS Batch Forum
Topic: SCRIPT help. for syntex problem
Replies: 4
Views: 726

Re: SCRIPT help. for syntex problem

You never enable delayed expansion anywhere, so !rc! doesn't mean anything to the interpreter.
by ShadowThief
27 Aug 2019 03:08
Forum: DOS Batch Forum
Topic: SCRIPT help. for syntex problem
Replies: 4
Views: 726

Re: SCRIPT help. for syntex problem

Without seeing the context that this snippet is in, it's impossible to say. Please post all of the code.
by ShadowThief
27 Aug 2019 03:05
Forum: DOS Batch Forum
Topic: "bat" file keeps closing after executing
Replies: 5
Views: 716

Re: "bat" file keeps closing after executing

Personally, I'm not going to run your script because it kills any process except for the ones listed in your script and you're missing some super important system processes you're blowing away and restoring %TEMP%, which won't work if anything is using the directory at the time you're deleting WIN38...
by ShadowThief
27 Aug 2019 02:55
Forum: DOS Batch Forum
Topic: string not working
Replies: 3
Views: 584

Re: string not working

You've got two options: Option 1 (recommended) - Use double quotes instead of single quotes in the set statement. Note that if you go this route, you should move the first double quote to the left of the variable name so that you get the benefit of quotes without the quotes actually being appended t...
by ShadowThief
23 Aug 2019 00:32
Forum: DOS Batch Forum
Topic: How to use command output in echo? assign cmd output to var?
Replies: 2
Views: 869

Re: How to use command output in echo? assign cmd output to var?

You can also use for /f as long as you're only expecting a single line to be returned (otherwise it returns one line at a time and sets the variable to the last line, but if you're looking for a specific line, you can always pipe it to a find).

Code: Select all

for /f "delims=" %%A in ('vol D:') do set volume=%%A
by ShadowThief
01 Aug 2019 20:44
Forum: DOS Batch Forum
Topic: B A T C H R E C U R S I O N exceeds STACK limits
Replies: 3
Views: 1757

Re: B A T C H R E C U R S I O N exceeds STACK limits

This happens when you've got setlocal in a loop somewehere. According to that error message, your script ran setlocal without endlocal 593 times.
by ShadowThief
26 Jun 2019 11:35
Forum: DOS Batch Forum
Topic: Can you do what I require via rod command?
Replies: 1
Views: 1335

Re: Can you do what I require via rod command?

No, but Outlook has its own dialect of VBA that you can use.