Search found 82 matches

by alleypuppy
13 Sep 2011 15:58
Forum: DOS Batch Forum
Topic: Finding Characters Within a Variable [solved]
Replies: 4
Views: 4111

Re: Finding Characters Within a Variable

If the character(s) are in a known position in the variable you can use the substring function of the set command. Follows is a partial copy out of the Help for Set. May also specify substrings for an expansion. %PATH:~10,5% would expand the PATH environment variable, and then use only the 5 charac...
by alleypuppy
12 Sep 2011 22:14
Forum: DOS Batch Forum
Topic: Finding Characters Within a Variable [solved]
Replies: 4
Views: 4111

Finding Characters Within a Variable [solved]

Hi all, I need help with finding characters within a variable. I need to identify if the user typed a network path (\\[server]\[sharename]) or a drive and path (C:\[folder]). Basically I need the file to determine if the variable that was set through the SET /P command (user input) contains "\\...
by alleypuppy
07 Sep 2011 19:28
Forum: DOS Batch Forum
Topic: CALL Help
Replies: 1
Views: 2564

CALL Help

Is it possible to call one batch file from another batch file and start from a certain label within the called batch file?
by alleypuppy
05 Sep 2011 11:31
Forum: DOS Batch Forum
Topic: Echo string from command as it updates in real-time
Replies: 3
Views: 3307

Re: Echo string from command as it updates in real-time

I like this program, however, I don't like how it repeats the process in order for the progress to refresh. I need the progress to update with the progress of the process being executed, not after the process is completed and then executing it again until the bar reaches 100%.
by alleypuppy
04 Sep 2011 20:41
Forum: DOS Batch Forum
Topic: Echo string from command as it updates in real-time
Replies: 3
Views: 3307

Echo string from command as it updates in real-time

Hello,

I want to echo a string from a command as it updates in real-time. For instance, I want to echo the progress of diskpart.exe in a batch file without showing all of the other stuff. Is this possible?

Thanks for any input.
by alleypuppy
11 Aug 2011 18:41
Forum: DOS Batch Forum
Topic: Send "Backspace" Key in Batch
Replies: 7
Views: 21138

Re: Send "Backspace" Key in Batch

Thanks Ed! It works perfectly!
by alleypuppy
11 Aug 2011 18:30
Forum: DOS Batch Forum
Topic: Send "Backspace" Key in Batch
Replies: 7
Views: 21138

Send "Backspace" Key in Batch

Hello,

Is there a way to send the "Backspace" key in a batch program? I know it would be easier to use a VBScript file and incorporate it into the batch program, but I'm not entirely sure how to do that and I would like for the program to stay one file. Thanks for any help.
by alleypuppy
05 Aug 2011 20:28
Forum: DOS Batch Forum
Topic: IF EXIST [string in file] THEN [command]
Replies: 2
Views: 3622

IF EXIST [string in file] THEN [command]

I'm making a batch file that will add a string to a file of it doesn't exist in that file. Is this possible?
by alleypuppy
08 Jul 2011 18:37
Forum: DOS Batch Forum
Topic: Load Batch File from CONFIG.SYS
Replies: 2
Views: 3183

Re: Load Batch File from CONFIG.SYS

DUH! I totally forgot about AUTOEXEC.BAT! Lol thanks!
by alleypuppy
08 Jul 2011 17:29
Forum: DOS Batch Forum
Topic: Load Batch File from CONFIG.SYS
Replies: 2
Views: 3183

Load Batch File from CONFIG.SYS

I know this is a Windows XP forum, but I have a quick DOS 7.1 question.

I want to run a simple batch file from my CONFIG.SYS file, but it doesn't seem to work. The file just freezes leaving me to force shutdown my computer. I'm using the command

Code: Select all

DEVICE=[path to file]
Is this correct?
by alleypuppy
02 Jul 2011 09:08
Forum: DOS Batch Forum
Topic: The "More" Command
Replies: 1
Views: 2642

The "More" Command

Hi all, I have a batch program that calls another batch program when a specific string is typed. In the called batch program, there is a lot of text. I tried using the "More" command to make it pause after each screenful of information, but all it does is type the raw text of the file, pau...
by alleypuppy
19 Jun 2011 11:02
Forum: DOS Batch Forum
Topic: Question About Keyboard Input
Replies: 7
Views: 6806

Re: Question About Keyboard Input

No it didn't seem to work. :(
by alleypuppy
19 Jun 2011 10:25
Forum: DOS Batch Forum
Topic: Question About Keyboard Input
Replies: 7
Views: 6806

Re: Question About Keyboard Input

The ASCII Character Set defines ^C as being "End of Text", which I guess is the same as "goto :eof"
by alleypuppy
19 Jun 2011 10:14
Forum: DOS Batch Forum
Topic: Question About Keyboard Input
Replies: 7
Views: 6806

Question About Keyboard Input

Hey guys, Is it possible to add something similar to the "pause" command, but instead of being able to press any key to continue, the user must press "Enter" to continue? Or is there a way to quit the batch file by pressing "Esc" or some key combination other than "...
by alleypuppy
10 Jun 2011 21:28
Forum: DOS Batch Forum
Topic: If not exist *
Replies: 8
Views: 9331

Re: If not exist *

I believe the if not exist * is seeing the implicit . folder (current directory) that exists in every folder, therefore it will never test true. The FOR command can be used instead. Use this to see if the current directory contains any files: set "file=" for %%f in (*) do set file=1 if de...