Search found 71 matches

by Hackoo
11 Oct 2019 18:25
Forum: DOS Batch Forum
Topic: date not showing
Replies: 3
Views: 275

Re: date not showing

I recommend you using the date independently of the region day/month order, you can use "WMIC os GET LocalDateTime" as a source, since it's in ISO order: @echo off for /F "usebackq tokens=1,2 delims==" %%i in (`wmic os get LocalDateTime /VALUE 2^>NUL`) do if '.%%i.'=='.LocalDateTime.' set ldt=%%j se...
by Hackoo
05 Oct 2019 06:26
Forum: DOS Batch Forum
Topic: [Solved] How to escape special characters on InputFile with Drag and Drop ?
Replies: 5
Views: 425

Re: How to escape special characters on InputFile with Drag and Drop ?

Exactly This & make the script down !
If i have for example a file named Key&.txt the script dosen't works !
by Hackoo
05 Oct 2019 04:30
Forum: DOS Batch Forum
Topic: [Solved] How to escape special characters on InputFile with Drag and Drop ?
Replies: 5
Views: 425

[Solved] How to escape special characters on InputFile with Drag and Drop ?

Hi :wink: The goal of this code is to drag and drop a file onto the script and it encodes or decodes it in Base64 with Certutil Command. So my question is : "What can i do to escape special characters when a file to be encoded or decoded have them ?" Thank you ! @echo off Set "file=%~1" If "%file%"=...
by Hackoo
22 Sep 2019 07:42
Forum: DOS Batch Forum
Topic: get File Size batch script.
Replies: 2
Views: 477

Re: get File Size batch script.

Hi :wink: Here is another code using a small vbscript to convert size to KB,MB and GB @echo off Title Get size of file or folder from a batch file by Hackoo 2019 SetLocal enabledelayedexpansion Set "MyBatchFile=%0" Set "MyFolder=%Temp%" Set "LogFile=%~dp0SizeLog.txt" If Exist "%LogFile%" Del "%LogFi...
by Hackoo
21 Sep 2019 01:29
Forum: DOS Batch Forum
Topic: get File Size batch script.
Replies: 2
Views: 477

Re: get File Size batch script.

Hi :wink: @echo off Title Get size file from a batch file SETLOCAL enabledelayedexpansion Set "MyBatchFile=%0" Set "MyFile=C:\temp\test.txt" echo( echo This batch file !MyBatchFile! has a size of %~z0 bytes echo( for %%A in ("%MyFile%") do ( set "Size=%%~zA" echo The file "!MyFile!" has a size of !s...
by Hackoo
21 Sep 2019 00:00
Forum: DOS Batch Forum
Topic: How to search for files with file names listed in a text file (DIR)?
Replies: 1
Views: 431

Re: How to search for files with file names listed in a text file (DIR)?

You can give a try with this batch script : @echo off Title Search and copy from file written by Hackoo on 21/09/2019 set "Source=source.txt" Set "SourceFolder=E:\Cam_Recorder" Rem You should modify this line to set your sourcefolder set "DestinationFolder=E:\MyData\backupfiles" Rem You should modif...
by Hackoo
18 Sep 2019 10:38
Forum: DOS Batch Forum
Topic: Auto Center Vbs Window
Replies: 3
Views: 571

Re: Auto Center Vbs Window

You should take a look here :wink:
by Hackoo
03 Aug 2018 05:35
Forum: DOS Batch Forum
Topic: List files modified since set date
Replies: 2
Views: 618

Re: List files modified since set date

You can take a look at this ==> https://stackoverflow.com/questions/9349815/comparing-a-modified-file-date-with-the-current-date-in-a-batch-file Use FORFILES /? from the command line to get documentation on its use. This simple command will list all text files that have been modified today : forfile...
by Hackoo
01 Aug 2018 01:46
Forum: DOS Batch Forum
Topic: Reading a hidden password via a FINDSTR bug
Replies: 10
Views: 2490

Re: Reading a hidden password via a FINDSTR bug

A beautiful find ! :wink: works on my windows 10 too :lol: @echo off Title Multi-Lines Comments and Reading a hidden password via a FINDSTR bug rem.||( Today on 01/08/2018 ; I learned two nice codes : This is a multiline comments from here ==> https://www.dostips.com/forum/viewtopic.php?p=57621#p576...
by Hackoo
31 Jul 2018 10:14
Forum: DOS Batch Forum
Topic: [BAT] Get-FileHash (MD2, MD4, MD5, SHA1, SHA256, SHA384, SHA512)
Replies: 4
Views: 930

Re: [BAT] Get-FileHash (MD2, MD4, MD5, SHA1, SHA256, SHA384, SHA512)

i wonder if is it possible to add a function in the same batch file that can check if this script exists on the right context menu Depends what context menu item you're talking about. Could be an item in the Send To which means that it is a link in the SenTo folder. Or it's a registry setting (see ...
by Hackoo
31 Jul 2018 03:59
Forum: DOS Batch Forum
Topic: [BAT] Get-FileHash (MD2, MD4, MD5, SHA1, SHA256, SHA384, SHA512)
Replies: 4
Views: 930

[BAT] Get-FileHash (MD2, MD4, MD5, SHA1, SHA256, SHA384, SHA512)

Hi :wink: This script can get all the Hashes (MD2, MD4, MD5, SHA1, SHA256, SHA384, SHA512) with Certutil.exe command from a file by drag and drop on this batch script and save the results in a text file. @echo off Color 0A & Mode 136,10 Title GET ( MD2, MD4, MD5, SHA1, SHA256, SHA384, SHA512 ) HASHE...
by Hackoo
27 Jul 2018 12:19
Forum: DOS Batch Forum
Topic: How to check (with "tasklist" built-in cmd) if prgm is running?
Replies: 9
Views: 1913

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

The user on SO might be happy with any kind of "piece of code". You can easily do everything in VBS. Just use a WMI query to terminate all instances of iexplore.exe if the URL was found. Steffen I did like this ! @echo off Title Checking Running Process and Get their command lines setlocal enablede...
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: 1913

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 ...