Search found 53 matches

by AR Coding
06 May 2022 16:06
Forum: DOS Batch Forum
Topic: printf.exe: Arithmetic and Programming
Replies: 31
Views: 131573

Re: printf.exe: Show formatted output AND evaluate arithmetic expressions!

You can do it in pure batch
example: Capital "A"

Code: Select all

set hex=41
set /a num=0x%hex%
call cmd /c exit /b %num%
set char=%=exitCodeASCII%
echo %char%
by AR Coding
19 Apr 2022 09:02
Forum: DOS Batch Forum
Topic: open and pass multiple commands to other shell
Replies: 5
Views: 7222

Re: open and pass multiple commands to other shell

Is this what you mean?

Code: Select all

cmd /c dbeaver.exe -data "%path_to_settings%"
use cmd /k to keep the window open after execution
by AR Coding
09 Apr 2022 20:51
Forum: DOS Batch Forum
Topic: Play One Song at a Time
Replies: 5
Views: 8187

Re: Play One Song at a Time

Did you try my way?
Or

Code: Select all

start "" /wait "C:\path\to\IrfanView.exe" "C:\path\to\Song 1.mp3"
...
...
by AR Coding
08 Apr 2022 12:14
Forum: DOS Batch Forum
Topic: xcopy not working
Replies: 2
Views: 5165

Re: xcopy not working

Try this:

Code: Select all

copy "C:\Users\utente\Google Drive\Shopify\Sincronia\Shopify.xlsm" "C:\Users\utente\Google Drive\Shopify\Sincronia\Shopify_bak.xlsm"

exit
by AR Coding
05 Apr 2022 20:04
Forum: DOS Batch Forum
Topic: Problem contactenating a string
Replies: 4
Views: 5827

Re: Problem contactenating a string

Hi.
I dont have this "sendEmail.exe" file and i dont know how to use it. But from a simple google search it appears that you are missing the '-f' option. So im guessing you should add a

Code: Select all

-f email@gmail.com
somewhere in the line.
by AR Coding
23 Mar 2022 19:52
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 2169094

Re: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets

If you want to output it to a new file you will have to specify the ' /o ' switch. If you specify ' /o - ' it will overwrite the original file. You can switch it like this:

Code: Select all

cmd /c jrepl.bat "\x06\xff\xbc\x87\xf3\x7a" "\x54\x4d\xff\x43\x53\xa7" /xseq /m /f "myfile.dat" /o "out.dat"
by AR Coding
15 Feb 2022 20:22
Forum: DOS Batch Forum
Topic: Condense Day-Date-Time Code for Reports.
Replies: 12
Views: 15440

Re: Condense Day-Date-Time Code for Reports.

@Aacini: beautiful code! but This is the way I would do this in a pure Batch-file, that run much, much faster than the PowerShell equivalent: was not the OP's original request... I am sure that the above TWO codes can be reduced and still produce the required output Though you definitely win with sp...
by AR Coding
15 Feb 2022 07:16
Forum: DOS Batch Forum
Topic: Condense Day-Date-Time Code for Reports.
Replies: 12
Views: 15440

Re: Condense Day-Date-Time Code for Reports.

I think this is what Squashman was reffering to

Code: Select all

for /f "delims=" %%a In ('powershell Get-Date -format "dddd \t\h\e dd-MMM-yyyy \a\t HH:mm:ss"') do set "created=%%a"
Echo(Created on: %created%
by AR Coding
15 Feb 2022 07:07
Forum: DOS Batch Forum
Topic: Condense Day-Date-Time Code for Reports.
Replies: 12
Views: 15440

Re: Condense Day-Date-Time Code for Reports.

MMM Is going to be the abreviated month (ex. Feb)

MM is going to be the two-digit numeric month (ex. 02)


Have a look at this chart https://ss64.com/ps/syntax-dateformat.html
by AR Coding
14 Feb 2022 21:15
Forum: DOS Batch Forum
Topic: Condense Day-Date-Time Code for Reports.
Replies: 12
Views: 15440

Re: Condense Day-Date-Time Code for Reports.

Ok. Good night , go get some rest. :D
by AR Coding
14 Feb 2022 20:40
Forum: DOS Batch Forum
Topic: Condense Day-Date-Time Code for Reports.
Replies: 12
Views: 15440

Re: Condense Day-Date-Time Code for Reports.

Small typo. Code fixed try it again

If that doesnt work, then you can try removing the curly brackets from the powershell command, and try again. I Am not sure if they are neccesary.
by AR Coding
14 Feb 2022 19:57
Forum: DOS Batch Forum
Topic: Condense Day-Date-Time Code for Reports.
Replies: 12
Views: 15440

Re: Condense Day-Date-Time Code for Reports.

If powershell is allowed... (untested)

Code: Select all

for /f "delims=" %%a In ('powershell Get-Date -format "{dddd \t\h\e dd-MMM-yyyy \a\t HH:mm:ss}"') do set "created=%%a"
Echo(Created on: %created%
by AR Coding
11 Feb 2022 14:23
Forum: DOS Batch Forum
Topic: To protect the file
Replies: 1
Views: 3402

Re: To protect the file

I think this would help
viewtopic.php?f=3&t=6108
by AR Coding
30 Jan 2022 20:21
Forum: DOS Batch Forum
Topic: search for previous item
Replies: 19
Views: 20444

Re: search for previous item

Just curious... What is the %%I for?
Eureka! wrote:
30 Jan 2022 19:07

Code: Select all

for /f "usebackq tokens=1 delims=:" %%I in (`findstr.exe /n /i /c:"%search%" temp1.txt`) do call :GetArchive %%I <---
I dont see it getting used anywhere...