Search found 103 matches

by Hackoo
27 Jul 2018 10:07
Forum: DOS Batch Forum
Topic: How to check (with "tasklist" built-in cmd) if prgm is running?
Replies: 9
Views: 8361

Re: How to check (with "tasklist" built-in cmd) if prgm is running?

I'm not a member on SO, Hackoo. Are you familiar with JScript hybrids? This is a proof of concept how to enumerate the URLs of the InternetExplorer tabs. @if (0)==(0) echo off for /f "delims=" %%i in ('cscript //nologo //e:jscript %~fs0') do ( echo %%i ) pause goto :eof @end try { var colShWindows ...
by Hackoo
22 Feb 2018 14:23
Forum: DOS Batch Forum
Topic: Script to audit hardware and software
Replies: 5
Views: 9687

Re: Script to audit hardware and software

You can add this command in one line with powershell : @echo off Powershell /command "Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-List" Pause And to use it on your main batch file : @echo of...
by Hackoo
14 Feb 2018 14:32
Forum: DOS Batch Forum
Topic: How to replace space in file names
Replies: 3
Views: 3893

Re: How to replace space in file names

How do SETLOCAL and ENABLEDELAYEDEXPANSION work?

Code: Select all

@echo off
Set "Pattern= "
Set "Replace=_"
Setlocal EnableDelayedExpansion
For /f "delims=" %%a in ('dir /b /s "*.txt"') Do (
Set "File=%%~nxa"
echo Ren "%%a" "!File:%Pattern%=%Replace%!"
)
pause
by Hackoo
11 Feb 2018 15:40
Forum: DOS Batch Forum
Topic: How to make cmd and batch script display correctly arabic characters?
Replies: 6
Views: 13282

Re: How to make cmd and batch script display correctly arabic characters?

Thank you both of you (penpen and aGerman) for your assistance and your help :wink:
by Hackoo
10 Feb 2018 16:34
Forum: DOS Batch Forum
Topic: How to make cmd and batch script display correctly arabic characters?
Replies: 6
Views: 13282

Re: How to make cmd and batch script display correctly arabic characters?

INFO.BAT version 1.4 -------------------------------------------------------------------------------- Windows version : Microsoft Windows [version 10.0.16299.125] Product name : Windows 10 Pro, 32 bit Performance indicators : Processor Cores: 4 Visible RAM: 2705772 kilobytes Date/Time format : (dd/...
by Hackoo
10 Feb 2018 12:04
Forum: DOS Batch Forum
Topic: Create a shortcut via batch file
Replies: 2
Views: 3830

Re: Create a shortcut via batch file

Just take a look at this https://stackoverflow.com/questions/30028709/how-do-i-create-a-shortcut-via-command-line-in-windows I just modify a little to create a shortcut on the startup folder instead on the desktop like in the example above @echo off Title Shortcut Creator for your batch and applicat...
by Hackoo
10 Feb 2018 10:27
Forum: DOS Batch Forum
Topic: How to make cmd and batch script display correctly arabic characters?
Replies: 6
Views: 13282

How to make cmd and batch script display correctly arabic characters?

I have tried this code to show some strings in arabic, but the charachters are shown as : â?â?ل?â? @echo off setlocal enableExtensions enableDelayedExpansion set "cp=" for /F "tokens=2 delims=:." %%a in ('chcp') do set "cp=%%~a" if not defined cp set "cp=850" >nul chcp 1256 set "quarterNote=مهدي" >n...
by Hackoo
10 Dec 2017 09:13
Forum: DOS Batch Forum
Topic: Move Folders with More than Two Files
Replies: 3
Views: 3769

Re: Move Folders with More than Two Files

You can set a new folder on your desktop to move your subfolders on it as example : If the output is correct on your side , you can remove the echo before the move command @echo off Set "DestinationFolder=%userprofile%\desktop\NewFolder" If not exist "%DestinationFolder%\" MD "%DestinationFolder%\" ...
by Hackoo
09 Nov 2017 20:15
Forum: DOS Batch Forum
Topic: Batch file to show or delete a numbered task names
Replies: 2
Views: 3390

Re: Batch file to show or delete a numbered task names

Thank you Squashman :wink: :lol: You have put me on the right direction :idea: And here is my modification : @echo off Mode 100,3 & color 0A Title Delete Tasks with their time tasks execution by Hackoo 2017 :Menu Mode 100,3 & color 0A cls & echo( echo Type the time with this format "hh:mm" or a task...
by Hackoo
09 Nov 2017 17:58
Forum: DOS Batch Forum
Topic: Batch file to show or delete a numbered task names
Replies: 2
Views: 3390

Batch file to show or delete a numbered task names

Hi ;) I need a little help to improve my new batch to show or delete a numbered task names The code below works fine if the task name does not contains a space :D So i'm looking how can i modify it to read a task name with a space :?: :roll: Thank you for any help :!: @echo off Title Delete Tasks wi...
by Hackoo
01 Oct 2017 14:09
Forum: DOS Batch Forum
Topic: How to catch error while sending an email with an hybrid code batch and powershell ?
Replies: 1
Views: 2828

Re: How to catch error while sending an email with an hybrid code batch and powershell ?

Hi I think that i got it here the working code, all the comments are welcome for improving this script For whom want to test this hybrid code, just copy and save this piece of code as Gmail_Batch_PS_Sender.bat So, when you execute it, the script asked you to type your Gmail Account without "@gm...
by Hackoo
01 Oct 2017 10:09
Forum: DOS Batch Forum
Topic: How to catch error while sending an email with an hybrid code batch and powershell ?
Replies: 1
Views: 2828

How to catch error while sending an email with an hybrid code batch and powershell ?

Hi I'm working for a script to send an e-mail with SSL Authentification (Gmail) with an hybrid code Batch and Powershell Script ! So my question how can i catch the error in order to show the correct message. Thank you ! <# : Batch portion @rem # The previous line does nothing in Batch, but begins a...