Search found 86 matches

by Meerkat
31 Aug 2015 03:22
Forum: DOS Batch Forum
Topic: Variable comparision in a batch file
Replies: 1
Views: 2413

Re: Variable comparision in a batch file

Sample.txt 2016JanFcst 2016FebFcst Code snippet: @echo off ( set /p var1= set /p var2= )<"Sample.txt" ::Uncomment the next line just to make sure the two strings are captured... ::echo."%var1%" "%var2%" if "%var1%"=="%var2%" ( call "Code1.bat&qu...
by Meerkat
30 Aug 2015 23:14
Forum: DOS Batch Forum
Topic: Experimenting on User Input....
Replies: 12
Views: 9436

Re: Experimenting on User Input....

So there is really no way to redirect CON to Stdout/StdErr?

Meerkat
by Meerkat
29 Aug 2015 07:20
Forum: DOS Batch Forum
Topic: Experimenting on User Input....
Replies: 12
Views: 9436

Experimenting on User Input....

Hi again! I am trying this as user input: @echo off for /f %%i in ('sc ^>nul') do echo %%i pause It has an advantage that it can handle Ctrl+C, Ctrl+Z, and some other "special" chars. It also does not echo the CRLF. Sample Output (Pressing Ctrl+C): ♥Press any key to continue . . . Now, I w...
by Meerkat
20 Aug 2015 22:08
Forum: DOS Batch Forum
Topic: Using "HTA input forms" in Batch files
Replies: 18
Views: 52986

Re: Using "HTA input forms" in Batch files

Thanks! Ill accept that. :D
by Meerkat
20 Aug 2015 08:01
Forum: DOS Batch Forum
Topic: Using "HTA input forms" in Batch files
Replies: 18
Views: 52986

Re: Using "HTA input forms" in Batch files

Guys from one Russian forum done it before (folder selection menu): @echo off for /f "usebackq delims=" %%i in ( `@"%systemroot%\system32\mshta.exe" "javascript:var objShellApp = new ActiveXObject('Shell.Application');var Folder = objShellApp.BrowseForFolder(0, 'Select Fold...
by Meerkat
18 Aug 2015 03:07
Forum: DOS Batch Forum
Topic: How to use chained redirections?
Replies: 24
Views: 20614

Re: How to use chained redirections?

Hmm... maybe I am wrong or I just do not understand the question (I am new into redirection), but hope this helps! This code is working on me... @echo off if "%1" equ "Restart" goto Restart "%~F0" Restart 3>&1 4>&3 5>&4 6>&5 | ftp -n goto :EOF :Restart e...
by Meerkat
17 Aug 2015 07:31
Forum: DOS Batch Forum
Topic: Batch change color of user input
Replies: 6
Views: 6495

Re: Batch change color of user input

According to the page...
because right now the answer is simply "yes."

Sorry, but I do not understand that part. :?


Maybe this could help...
http://stackoverflow.com/questions/1514 ... ut-by-user

However, I think the task is not really good to do...

Meerkat
by Meerkat
16 Aug 2015 08:39
Forum: DOS Batch Forum
Topic: command prompt in windows 10
Replies: 37
Views: 40459

Re: command prompt in windows 10

npocmaka_ wrote:Just installed it ,
and this what I've saw at a glance.

telnet has a new command line switch : -f for log file

*[Snip]



My classmate (I am 17) also tried Windows 10, but he says that Telnet is not recognized as command.

Meerkat
by Meerkat
16 Aug 2015 08:16
Forum: DOS Batch Forum
Topic: Store Ctrl+C Char
Replies: 6
Views: 6288

Re: Store Ctrl+C Char

...but this is the output: var=♥ Yep - That is how the console displays a Ctrl-C (0x03) character Dave Benham Yeah, that's quite weird. Sorry I thought that "heart" symbol is not the char (I am new into this), but I applied it to my code and it works smoothly! Thanks everyone! Meerkat
by Meerkat
16 Aug 2015 08:05
Forum: DOS Batch Forum
Topic: Store Ctrl+C Char
Replies: 6
Views: 6288

Re: Store Ctrl+C Char

I tried this: @echo off setlocal ::Define a Linefeed variable set LF=^ ::above 2 blank lines are critical - do not remove. call :hexprint "0x03" var set var exit /b :hexPrint string [rtnVar] for /f eol^=^%LF%%LF%^ delims^= %%A in ( 'forfiles /p "%~dp0." /m "%~nx0" /c &q...
by Meerkat
16 Aug 2015 07:25
Forum: DOS Batch Forum
Topic: Store Ctrl+C Char
Replies: 6
Views: 6288

Store Ctrl+C Char

I saw this topic: viewtopic.php?f=3&t=5860 automating the Bell character. Now, is there a way to store the Ctrl+C character as a variable?

Meerkat
by Meerkat
16 Aug 2015 06:33
Forum: DOS Batch Forum
Topic: Commands with "Console"
Replies: 5
Views: 4711

Re: Commands with "Console"

If you consider DEBUG, then you should also consider EDLIN that still works in my Windows 8.1 32-bits modern computer! C:\Users\Antonio>ver Microsoft Windows [Versión 6.3.9600] C:\Users\Antonio>edlin test.txt New file *? Edit line line# Append [#lines]A Copy [startline],[endline],toline[,times]C De...
by Meerkat
16 Aug 2015 03:30
Forum: DOS Batch Forum
Topic: Commands with "Console"
Replies: 5
Views: 4711

Re: Commands with "Console"

telnet diskpart powershell wmic maybe more. What aspects are you testing? I am just experimenting on automating commands in those "consoles" (with or without temp files). CMD, PowerShell, and WMIC has well-known ways in automating commands (ex. PowerShell has -C option). I will add NSLOOK...
by Meerkat
15 Aug 2015 23:47
Forum: DOS Batch Forum
Topic: Commands with "Console"
Replies: 5
Views: 4711

Commands with "Console"

Hi again!

I am just asking what are the commands that contains its own "console"? For example, FTP has its own "console/command line." I am just currently experimenting on them.....

Thanks! :D

Meerkat
by Meerkat
15 Aug 2015 06:18
Forum: DOS Batch Forum
Topic: Find command not working!?
Replies: 4
Views: 4854

Re: Find command not working!?

Hmm...What is the %path%? Maybe there are problems there. :)

Type this in CMD:

Code: Select all

path


Meerkat