Search found 442 matches

by orange_batch
20 Dec 2011 07:42
Forum: DOS Batch Forum
Topic: SET Command
Replies: 7
Views: 3019

Re: SET Command

Yeah you got it right. First loop example: Call Set "FileList=%%FileList%% "%%A"" expands to Set "FileList=%FileList% "a_file.txt"" expands to Set "FileList= "a_file.txt"" Second loop: Call Set "FileList=%%FileList%% "%%A"&qu...
by orange_batch
19 Dec 2011 04:18
Forum: DOS Batch Forum
Topic: create sequence number.
Replies: 5
Views: 2400

Re: create sequence number.

It shouldn't display using @echo off, but set /a counter+=1 >nul would do.
by orange_batch
19 Dec 2011 04:07
Forum: DOS Batch Forum
Topic: How do i open an ms-dos batch file?
Replies: 3
Views: 2025

Re: How do i open an ms-dos batch file?

The batch either did its job and terminated, or there are bugs in it that made it exit early. You'll have to post the batch file contents here.
by orange_batch
18 Dec 2011 05:31
Forum: DOS Batch Forum
Topic: how can I make an infinite for loop?
Replies: 2
Views: 1510

Re: how can I make an infinite for loop?

You mean, a "while" loop.

Code: Select all

:label

code

goto label

But if you mean literally...

Code: Select all

for /l %? in () do (
code
)
by orange_batch
18 Dec 2011 01:39
Forum: DOS Batch Forum
Topic: batch "decryption"
Replies: 2
Views: 1639

Re: batch "decryption"

viewtopic.php?t=1226

viewtopic.php?t=1493

There are these older threads as well.
by orange_batch
16 Dec 2011 12:52
Forum: DOS Batch Forum
Topic: Batch Distribution Channel
Replies: 2
Views: 1433

Re: Batch Distribution Channel

I speak for myself, but it's hard to say. There are websites out there already, like ones owned by Microsoft, that use better languages like Powershell. The problem with batch is it has limited unicode support, and it can be localization-dependent (which can usually be worked around using calls to V...
by orange_batch
16 Dec 2011 12:24
Forum: DOS Batch Forum
Topic: create sequence number.
Replies: 5
Views: 2400

Re: create sequence number.

If there are any lines such as comments, they can be dealt with, but following your example: @echo off&setlocal enabledelayedexpansion :: Use only one of the following: :: To grab the first value of the last line in variable_list.csv... for /f "usebackq delims=," %%a in ("variable...
by orange_batch
14 Dec 2011 06:29
Forum: DOS Batch Forum
Topic: The 8+8=16k double memory combo.
Replies: 7
Views: 2944

Re: 8 + 8 = 16k

So, are you guys anywhere near developing a solid modular macro library? I've been avoiding this insanity like the plague, but I'm interested in the results lol.

By modular I mean, being able to pick and choose which functions to add to a script, rather than loading an entire library. :wink:
by orange_batch
13 Dec 2011 12:59
Forum: DOS Batch Forum
Topic: Dos batch file to check scheduled task status
Replies: 7
Views: 10273

Re: Dos batch file to check scheduled task status

Code: Select all

SCHDTASKS /Query /s Myserver /fo table /nh | find "Running" | find /c "FTP_"

find /c "Running" :wink:

That is, remove the part in red.
by orange_batch
13 Dec 2011 09:26
Forum: DOS Batch Forum
Topic: Append command line output dynamically
Replies: 3
Views: 2554

Re: Append command line output dynamically

Here's a brief example of an echo system I developed. It's actually a simple concept. @echo off&setlocal enabledelayedexpansion call :echo "Hello" call :echo "World" call :echo "I" call :echo "Like" call :echo "Bananas" pause set /a #echolen-=1 c...
by orange_batch
12 Dec 2011 22:14
Forum: DOS Batch Forum
Topic: Dos batch file to check scheduled task status
Replies: 7
Views: 10273

Re: Dos batch file to check scheduled task status

Oh, what you mean is you only want it to run decrypt once, after your task is found running, and then NOT running, but then to continue it's regular check. :query schtasks /query /s myserver /fo list /tn "my_task_name" | find /c "Running"&&( (code to run if successful) se...
by orange_batch
12 Dec 2011 20:21
Forum: DOS Batch Forum
Topic: My program breaks when run with batch
Replies: 2
Views: 1799

Re: My program breaks when run with batch

The only problem could be that it's working in the wrong directory. So that means it's being passed along by command prompt to your program. Either reset it explicitly within your program, or change the current directory of Command Prompt first. You can accomplish this while keeping your paths relat...
by orange_batch
12 Dec 2011 16:49
Forum: DOS Batch Forum
Topic: Dos batch file to check scheduled task status
Replies: 7
Views: 10273

Re: Dos batch file to check scheduled task status

I'm not sure what you mean. If the task isn't running, it'll goto decrypt. If you want it to keep looping after the decrypt loop, put another goto query after the decrypt code.
by orange_batch
12 Dec 2011 15:36
Forum: DOS Batch Forum
Topic: Dos batch file to check scheduled task status
Replies: 7
Views: 10273

Re: Dos batch file to check scheduled task status

:query schtasks /query /s myserver /fo list /tn "my_task_name" | find /c "Running"&&( code to run if successful )||( code to run if failed ) ping -n 2 0 >nul goto query Where ping -n 2 is the number of seconds to delay + 1. That is, 2 is a 1-second delay, 3 is a 2-second...
by orange_batch
12 Dec 2011 14:22
Forum: DOS Batch Forum
Topic: Help with context menu
Replies: 6
Views: 2954

Re: Help with context menu

Nice, thanks! This is perfect! I experimented with it a bit, so to help you out Bashis, here's a quick guide for what you want to do: 1. Download 7-zip if you don't already have it (required). http://www.7-zip.org 2. Download KuShellExtension here. 3. Right click KuShellExtension-0.04.7z and select ...