Search found 82 matches

by alleypuppy
24 Apr 2012 22:56
Forum: DOS Batch Forum
Topic: [Solved] Start CMD With Inactive Window
Replies: 9
Views: 10240

Re: Start CMD With Inactive Window

Ed Dyreen wrote:'
An external app may do the trick

Code: Select all

cmdow.EXE "process" /INA
This works great! Thanks!
by alleypuppy
21 Apr 2012 19:16
Forum: DOS Batch Forum
Topic: [Solved] Start CMD With Inactive Window
Replies: 9
Views: 10240

Re: Start CMD With Inactive Window

This will start another CMD prompt window minimised. start /min I don't want the window to be minimized. The window that I want to open inactively is supposed to be a log file of sorts that comes up behind the window that the user's interacting with. I don't want the user to have to manually make t...
by alleypuppy
21 Apr 2012 10:01
Forum: DOS Batch Forum
Topic: [Solved] Start CMD With Inactive Window
Replies: 9
Views: 10240

[Solved] Start CMD With Inactive Window

Hey everybody, I want to know how to open another Command Prompt window from an existing one without the new window being placed in front of the existing window; I want it to open as an inactive window, in other words. Is there a way to do this without having to download an external program? Thanks ...
by alleypuppy
01 Mar 2012 21:01
Forum: DOS Batch Forum
Topic: Byte Conversion
Replies: 2
Views: 4460

Byte Conversion

Hello, I'm working on a batch file that backs up data and I want the file to show the current file size in bytes, kilobytes, megabytes, and gigabytes. I know how to get the file size in bytes, but converting it is the problem. I know I can do [size in bytes]/1024 to find the size in kilobytes, but t...
by alleypuppy
04 Jan 2012 20:52
Forum: DOS Batch Forum
Topic: Setting Variables Within FOR Loops
Replies: 1
Views: 3576

Setting Variables Within FOR Loops

Hello again, I need to check to see if a line (or lines) in a file is greater that 80 characters. To do this I need to set the value of %%a equal to a variable. I've noticed that the setting of a variable doesn't take effect until after the loop ha finished. How can I do this without exiting the loo...
by alleypuppy
02 Jan 2012 18:17
Forum: DOS Batch Forum
Topic: Erase SET /P Prompt after execution
Replies: 9
Views: 14659

Re: Erase SET /P Prompt after execution

I wrote my own clearchars program. You can find the exe and the source at http://batchbin.ueuo.com/clearchars.zip . Just use it like this: clearchars [X] [Y] [number of chars] I think this is what you are looking for. Please post any problems you have with it, so I can fix 'em --Phillid Hmm... it s...
by alleypuppy
02 Jan 2012 16:30
Forum: DOS Batch Forum
Topic: Erase SET /P Prompt after execution
Replies: 9
Views: 14659

Erase SET /P Prompt after execution

Hello,

Is it possible to erase the SET /P prompt without clearing the entire screen after the execution of the prompt?
by alleypuppy
01 Jan 2012 21:26
Forum: DOS Batch Forum
Topic: Changing the PAUSE prompt
Replies: 5
Views: 11423

Re: Changing the PAUSE prompt

It's possible even if it looks a bit odd pause>nul|set /p "=[message]"<nul&echo( The "echo(" let the cursor jump to the next line after you hit a key. Regards aGerman Works perfectly! Thanks! I figured I needed to include SET /P in there somewhere, but I wasn't sure how. I j...
by alleypuppy
01 Jan 2012 17:52
Forum: DOS Batch Forum
Topic: Changing the PAUSE prompt
Replies: 5
Views: 11423

Changing the PAUSE prompt

Hello,

This is sort of a dumb question, but is it possible to modify the PAUSE prompt witout creating a new line under the new prompt? I am aware of the

Code: Select all

ECHO [message]
PAUSE > NUL
trick, but the blank line under the message annoys me. Is there any way to get rid of this blank new line?
by alleypuppy
21 Dec 2011 13:24
Forum: DOS Batch Forum
Topic: Get last string after delimiter FOR /F
Replies: 3
Views: 12687

Get last string after delimiter FOR /F

Hello, I want to know if it's possible to get the last string after the specified delimiter in a FOR /F loop. For example, say I have the directory C:\WINDOWS\Web\Wallpaper I want to extract only "Wallpaper" from the string using a FOR /F loop. Or if I have C:\Users\[username]\Desktop\Exam...
by alleypuppy
08 Dec 2011 14:57
Forum: DOS Batch Forum
Topic: Echo results of FOR /F loop on one line
Replies: 2
Views: 4244

Re: Echo results of FOR /F loop on one line

!k wrote:

Code: Select all

setlocal enabledelayedexpansion
set "$="
for /f "usebackq delims=" %%a in ("text.txt") do set "$=!$!%%a"
echo:!$!

:?:

Works perfectly, thanks!
by alleypuppy
08 Dec 2011 12:27
Forum: DOS Batch Forum
Topic: Echo results of FOR /F loop on one line
Replies: 2
Views: 4244

Echo results of FOR /F loop on one line

Hello, I have a text file that is appended to by a batch file. I want to echo the data of the file on one line using a FOR /F loop and set the result equal to a variable. I'm guessing this is possible, but I don't know how to do it. For example, here is my text file: 0 1 2 3 I want the result to loo...
by alleypuppy
07 Dec 2011 22:52
Forum: DOS Batch Forum
Topic: Find the amount of characters in a string after SET /P
Replies: 8
Views: 9596

Re: Find the amount of characters in a string after SET /P

' Use ben's function, now let's see ' This should work @echo off set "var=How long is this ?" &call :strLen var pause exit /b :strLen string len -- returns the length of a string setlocal enabledelayedexpansion set "str=A!%~1!" set "len=0" for /l %%A in (12,-1,0) d...
by alleypuppy
07 Dec 2011 16:06
Forum: DOS Batch Forum
Topic: Find the amount of characters in a string after SET /P
Replies: 8
Views: 9596

Re: Find the amount of characters in a string after SET /P

' This is the algorithm, it's gonna take time to figure it out, just ask, anything set "$vl=A%%~b" set "$l=0" for %%! in ( 12, -1, 0 ) do set /a "$l|=1<<%%~!" &for %%? in ( "!$l!" ) do if /i ["!$vl:~%%~?,1!"] == [""] ( set /a "$l&...
by alleypuppy
07 Dec 2011 14:04
Forum: DOS Batch Forum
Topic: Find the amount of characters in a string after SET /P
Replies: 8
Views: 9596

Find the amount of characters in a string after SET /P

Hello,

Is it possible to find out how may characters a user has typed after reaching a SET /P prompt? If it is possible, which I'm assuming it is, I'm thinking I'd need to use a FOR loop, but I'm not sure how to set it up.

Any help would be appreciated. :wink: