Search found 103 matches
- 31 Oct 2019 05:18
- Forum: DOS Batch Forum
- Topic: [Solved] How to filter all non-Microsoft services with WMIC and redirect the result to a text file ?
- Replies: 6
- Views: 9980
Re: How to filter all non-Microsoft services with WMIC and redirect the result to a text file ?
Sorry My bad i got it , I forgot to add the percent % in the batch file, so with a batch file works 5/5 @echo off WMIC service where "Not PathName like '%%Micro%%' AND Not PathName like '%%Windows%%'" get Name, DisplayName, PathName, Status >"%computername%.txt" Start "" "%computername%.txt" & exit ...
- 31 Oct 2019 05:02
- Forum: DOS Batch Forum
- Topic: [Solved] How to filter all non-Microsoft services with WMIC and redirect the result to a text file ?
- Replies: 6
- Views: 9980
[Solved] How to filter all non-Microsoft services with WMIC and redirect the result to a text file ?
Hi :wink: WMIC service where "Not PathName like '%Micro%' AND Not PathName like '%Windows%'" get Name, DisplayName, PathName, Status So this command works 5/5 on the console but the problem is when I want to redirect the result to a text file, I get all the instances without any filter? while I see ...
- 11 Oct 2019 18:25
- Forum: DOS Batch Forum
- Topic: date not showing
- Replies: 3
- Views: 9843
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...
- 05 Oct 2019 09:45
- Forum: DOS Batch Forum
- Topic: [Solved] How to escape special characters on InputFile with Drag and Drop ?
- Replies: 5
- Views: 11289
Re: How to escape special characters on InputFile with Drag and Drop ?
Thank you for your helpful answer
The problem is solved
The problem is solved
- 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: 11289
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 !
If i have for example a file named Key&.txt the script dosen't works !
- 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: 11289
[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%"=...
- 22 Sep 2019 07:42
- Forum: DOS Batch Forum
- Topic: get File Size batch script.
- Replies: 4
- Views: 19824
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...
- 21 Sep 2019 01:29
- Forum: DOS Batch Forum
- Topic: get File Size batch script.
- Replies: 4
- Views: 19824
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...
- 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: 6658
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...
- 18 Sep 2019 10:38
- Forum: DOS Batch Forum
- Topic: Auto Center Vbs Window
- Replies: 3
- Views: 6885
Re: Auto Center Vbs Window
You should take a look here
- 03 Aug 2018 05:35
- Forum: DOS Batch Forum
- Topic: List files modified since set date
- Replies: 2
- Views: 3442
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...
- 01 Aug 2018 01:46
- Forum: DOS Batch Forum
- Topic: Reading a hidden password via a FINDSTR bug
- Replies: 10
- Views: 12004
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...
- 31 Jul 2018 10:14
- Forum: DOS Batch Forum
- Topic: [BAT] Get-FileHash (MD2, MD4, MD5, SHA1, SHA256, SHA384, SHA512)
- Replies: 4
- Views: 5538
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 ...
- 31 Jul 2018 03:59
- Forum: DOS Batch Forum
- Topic: [BAT] Get-FileHash (MD2, MD4, MD5, SHA1, SHA256, SHA384, SHA512)
- Replies: 4
- Views: 5538
[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...
- 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: 8138
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...