Search found 9 matches

by batmanbatmanbatmen
24 Sep 2022 12:36
Forum: DOS Batch Forum
Topic: [SOLVED] Read grep's output and send email?
Replies: 4
Views: 2630

Re: Read grep's output and send email?

curl https://www.acme.com |find "something" if %errorlevel% == 0 call :Email2Adm goto :eof :Email2Adm echo "Something find" cscript sendm.vbs goto :eof Send email can use vbs. For your reference: ================= File name: sendm.vbs Const cdoSendUsingPickup = 1 'Send message using the local SMTP s...
by batmanbatmanbatmen
24 Sep 2022 04:41
Forum: DOS Batch Forum
Topic: Need help how to make script working.
Replies: 1
Views: 6378

Re: Need help how to make script working.

1. folders already divided by date <-- only write one script for one folder is ok. 2. within 10 seconds <--- luckly folders already divided by date. Using following command to get files time down to second level so that you can calculate the 10 sec gap. c:\wmic DataFile where "Name='c:\\path\\file.t...
by batmanbatmanbatmen
24 Sep 2022 04:00
Forum: DOS Batch Forum
Topic: User Input -> Update File -> Run Command using updated file
Replies: 1
Views: 4898

Re: User Input -> Update File -> Run Command using updated file

Not too understand your process. But suggest: if you want create a script that run at user's computer: 1. asks user for IP address <-- can get by script. No need ask user. 2. asks user for login <--- prompt user input at script 3. asks user for password <---- prompt user input at script 4. creates c...
by batmanbatmanbatmen
24 Sep 2022 03:51
Forum: DOS Batch Forum
Topic: how to read name value pairs from command line
Replies: 1
Views: 4747

Re: how to read name value pairs from command line

Code: Select all

@echo off

:loop
set np=
if "%~1" == "" goto :eof
set np=%1
shift
set np=%np%=%1
shift
echo %np%
goto :loop
by batmanbatmanbatmen
24 Sep 2022 03:38
Forum: DOS Batch Forum
Topic: How can I make two variables related, so setting one sets the other?
Replies: 1
Views: 3561

Re: How can I make two variables related, so setting one sets the other?

Not sure it can help as don't too understand your requirement. However, 1. If want user easy configurable, you can create separate ini file or prompt use input. 2. If you want only ONE file, it seems that the file will modify itself. It is possible but difficult and will have many bug. if further he...
by batmanbatmanbatmen
24 Sep 2022 03:09
Forum: DOS Batch Forum
Topic: Debug and Rate AI code
Replies: 1
Views: 3343

Re: Debug and Rate AI code

First, use setlocal enabledelayedexpansion 2rd, inside for loop, you can try ('echo xxx') instead of ('xxx'). Sometime is ok. 3nd, I don't understand your encrypted message method. Do you want to remove space in "message" or merge all input message to one ? For example as below, is it correct ? 1st ...
by batmanbatmanbatmen
24 Sep 2022 02:49
Forum: DOS Batch Forum
Topic: What "old style" is cmd /? on cmd /c talking about?!
Replies: 1
Views: 1988

Re: What "old style" is cmd /? on cmd /c talking about?!

I am not professional on cmd & command. I guess command.com is old style that did not support quote "...". It the past, file is 8.3 format. It assume no space that it should not have quote.
by batmanbatmanbatmen
23 Sep 2022 22:32
Forum: DOS Batch Forum
Topic: Get Funky ASCII ART with Colors and Playing music in the background for introduction animation
Replies: 3
Views: 2481

Re: Get Funky ASCII ART with Colors and Playing music in the background for introduction animation

Troubleshoot is difficult. Check the stupid issue first. Make sure, speak ok, mediaplayer install, administrator authority, version, patch, antivirus, ..... Anyway, I want to say your coding is good and interesting. However, for me, I will only use dos cmd only to avoid powershell or any uncontrol i...