Search found 6 matches

by JustJoe
28 Mar 2009 13:23
Forum: DOS Batch Forum
Topic: GOTO not working as it should
Replies: 4
Views: 7353

Greetings: You forgot the colon in your goto statment Example: currently "GOTO SHOWDOCS" should be "GOTO :SHOWDOCS" another problem is with your conditionals Example: currently "IF %F%=="Y" GOTO SHOWARCH" should be "IF "!F!"=="Y" GOTO ...
by JustJoe
27 Mar 2009 02:34
Forum: DOS Batch Forum
Topic: script in copying files to folders in Win2003
Replies: 1
Views: 4571

Greetings:

This should get you started

Take a look in the "DOS Batch - Date and Time" area on this site. Lots of good stuff about "Using date and time functions in DOS."

http://www.dostips.com/DtTipsDateTime.php

Cheers
by JustJoe
24 Mar 2009 13:26
Forum: DOS Batch Forum
Topic: RETRIEVING THE COMBINED SUM OF A SPECIFIED FILE EXTENSION...
Replies: 1
Views: 4723

Greetings:

for /F loop with dir path\*.dll /N
Process each line looking for the unique signature IE: .dll in your usecase
if found then
cheery pick the size field from the line
set /a totalsize+=filesize
endif
endfor


cheers
by JustJoe
20 Mar 2009 09:46
Forum: DOS Batch Forum
Topic: batch on-screen and logged to textfile?
Replies: 4
Views: 7915

Greetings:

Give tee (Unix util that forks stdout between the console and a file) a try. Yes it has been ported to DOS/Winblows.

Google is your friend

cheers
by JustJoe
18 Mar 2009 10:06
Forum: DOS Batch Forum
Topic: Any good ideas for doing away with FOR and IF commands....
Replies: 2
Views: 5697

Greetings:

The "FOR" could be done in a "Do....While" but not quite as efficiently. The "IF: is a pretty basic conditional statement. You could use unary operators but then your code is much less easy to read and understand.

cheers
by JustJoe
17 Mar 2009 13:02
Forum: DOS Batch Forum
Topic: Replace a substring using Set command
Replies: 5
Views: 10904

Greetings: Give this a try Tested with WinXP Pro U:\Batch-Variables>modstring "nrel=0" 0 1 Modified: "nrel=0" to: "nrel=1" ============================================== @echo off :: modstring.bat :: :: arg %1 = String to modify :: arg %2 = String to find :: arg %3 = Re...