Search found 86 matches

by Meerkat
02 Jan 2016 06:40
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 43149

Re: Sdel - speedy deletion utility

this still doesn't work if /i "%~1"=="/s" ( goto sub ) :sub if "%~2"=="" ( set /p d=enter path of folder to delete: ) else ( set "d=%~2" ) cd /d %d% setlocal EnableDelayedExpansion FORFILES /S /C "CMD /C ECHO @relpath">slist.txt for /f &qu...
by Meerkat
21 Dec 2015 06:21
Forum: DOS Batch Forum
Topic: Problems with Batch-VBS Hybrid
Replies: 4
Views: 5795

Re: Problems with Batch-VBS Hybrid

siberia-man wrote:@Meerkat:
Have you tried this script http://www.dostips.com/forum/viewtopic. ... 780#p37780 ?


Before, yea... but an outdated one. Thanks! :D
by Meerkat
20 Dec 2015 10:57
Forum: DOS Batch Forum
Topic: About Finding Batch Labels using FINDSTR
Replies: 1
Views: 2558

About Finding Batch Labels using FINDSTR

Hi again guys! Assuming the quirky rules from m are not in my batch file (Only whitespaces are present), how can I detect batch labels using FINDSTR? For instance, (Sample.bat) ::Intro comments ::Blablabla ::Yeah!!! ::Blablabla @echo off ::Comment again goto :main ::Some codes here... :main ::Some c...
by Meerkat
19 Dec 2015 00:55
Forum: DOS Batch Forum
Topic: Problems with Batch-VBS Hybrid
Replies: 4
Views: 5795

Problems with Batch-VBS Hybrid

While I am writing a Batch-VBS hybrid using <SUB> character, GOTOs and (maybe) CALLs does not work. Code: (Just a demo) ::'@echo off remgoto :a remrem Some codes here... rem:a remecho This will be displayed! rempause remrem Some VBS codes here... Output: The system cannot find the batch label...
by Meerkat
18 Dec 2015 21:07
Forum: DOS Batch Forum
Topic: Simple concatenation fails
Replies: 3
Views: 3754

Re: Simple concatenation fails

Fixed Code: @echo off FOR /F "tokens=2,3,4 delims=/" %%a in ("%date: =/%") do set yy=%%c& set mm=%%b & set dd=%%a set /a lastyear=%yy%-1 set output=IS_%lastyear% echo %output% Output: IS_2014 Have a look in the %date% variable: >echo %date% Wed 12/16/2015 The delimiters h...
by Meerkat
13 Dec 2015 06:46
Forum: DOS Batch Forum
Topic: Create Windows 8 restore point programmatically
Replies: 7
Views: 7067

Re: Create Windows 8 restore point programmatically

Must be run as admin: wmic /namespace:\\root\default path SystemRestore call createrestorepoint "wmic auto backup", 100, 12 Hello! What does the 100,12 mean? Thanks! UPDATE: I finally got it. This link describes the numbers 100 (EventType) and 12(RestorePointType): https://msdn.microsoft....
by Meerkat
09 Sep 2015 08:44
Forum: DOS Batch Forum
Topic: Problem with this code.
Replies: 4
Views: 4063

Re: Problem with this code.

From this sample code (take note of the exit /b ): @echo off setlocal enabledelayedexpansion set x=0 for /l %%I in () do ( set /a x+=1 echo.!x! if !x!==100 exit /b ) It prints from 1 to 100, but does not close the CMD window... Now, when you do this: (Just EXIT...) @echo off setlocal enabledelayedex...
by Meerkat
09 Sep 2015 04:47
Forum: DOS Batch Forum
Topic: Problem with this code.
Replies: 4
Views: 4063

Re: Problem with this code.

I am no good in error detecting, but... 1) From this line, where does the %%R came from? start "" /WAIT "%~0" loop1 %%R ^^^>t1.txt | start "" /WAIT "%~0" loop2 %%R ^^^<t1.txt 2) Sorry, but I think exit /b just cannot break for /l %%? in () do (...) . Just the ...
by Meerkat
07 Sep 2015 05:56
Forum: DOS Batch Forum
Topic: Using PowerShell to check if URLs are valid
Replies: 16
Views: 29592

Re: Using PowerShell to check if URLs are valid

Sir, something like this? Batch file code: @echo off powershell -command "gc 'links.txt'|%%{if($(try{[int][Net.WebRequest]::Create($_).GetResponse().Statuscode}Catch{}) -eq 200){$_+' [OK]'}else{$_+' [X]'}}" pause links.txt http://www.google.com https://www.google.com http://www.teeeelstra....
by Meerkat
06 Sep 2015 23:07
Forum: DOS Batch Forum
Topic: "Turtle Graphics" in Batch files!
Replies: 4
Views: 13971

Re: "Turtle Graphics" in Batch files!

It's simply amazing! Now let me do some Batch art!!! set "no=20" & for /l %i in (1,1,!no!) do (call :rt 360/!no! & for /L %k in (1,1,60) do call :pd & call :rt 6 & call :fd 7 & call :pu ) http://i.imgur.com/hbSjVTj.jpg You can change the value of !no! to change the numb...
by Meerkat
06 Sep 2015 19:52
Forum: DOS Batch Forum
Topic: Using PowerShell to check if URLs are valid
Replies: 16
Views: 29592

Re: Help Needed in PowerShell

Hi Yury, thanks for the reply and this what i tried based on your input. I created .bat file and pasted the code as below @powershell "gc 'E:\CheckImageExits\mm.txt'|%%{if($(Try{(iwr $_).StatusCode}Catch{}) -eq 200){$_}}|sc 'True_URL.txt'" but nothing is happening. any suggestion please H...
by Meerkat
05 Sep 2015 03:52
Forum: DOS Batch Forum
Topic: Need Some Help Basic Batch
Replies: 2
Views: 2838

Re: Need Some Help Basic Batch

http://help.fdos.org/en/hhstndrd/batch/ http://help.fdos.org/en/hhstndrd/batch/echo.htm http://help.fdos.org/en/hhstndrd/batch/choice.htm Hmm... There is an example at http://help.fdos.org/en/hhstndrd/batch/choice.htm that looks like what you need Meerkat
by Meerkat
31 Aug 2015 07:11
Forum: DOS Batch Forum
Topic: Experimenting on User Input....
Replies: 12
Views: 9436

Re: Experimenting on User Input....

dbenham wrote:
Squashman wrote:As far as I know, everything going to con, gets output on the console.

Translation - No, it cannot be captured in a variable :wink:


Oh... Sorry :oops:

BTW, Thanks everyone!

Meerkat
by Meerkat
31 Aug 2015 03:44
Forum: DOS Batch Forum
Topic: Experimenting on User Input....
Replies: 12
Views: 9436

Re: Experimenting on User Input....

There is really no way to catch the character being pressed from SC?
by Meerkat
31 Aug 2015 03:35
Forum: DOS Batch Forum
Topic: Experimenting on User Input....
Replies: 12
Views: 9436

Re: Experimenting on User Input....

OperatorGK wrote:Strangely, this doesn't do anything on my Win10. What Windows version you are using?


Just type SC in the console first if it exists.

Meerkat