Search found 3646 matches

by aGerman
07 Jun 2010 12:52
Forum: DOS Batch Forum
Topic: Help Reading 2 tokens / line from each outputting to 1 line
Replies: 2
Views: 1564

Re: Help Reading 2 tokens / line from each outputting to 1 l

I'm not sure what you realy need, but I think you have to write your file line by line. Try this

Code: Select all

@echo off &setlocal

for /f "tokens=1,2" %%G in (weather.txt) do (
  >>file.txt echo ^<commercial start=%%G end=%%H /^>
)



Regards
aGerman
by aGerman
07 Jun 2010 10:49
Forum: DOS Batch Forum
Topic: Dynamically assigned environmental variables
Replies: 5
Views: 2198

Re: Dynamically assigned environmental variables

Try this

Code: Select all

@echo off &setlocal
pushd "C:\Documents and Settings"
for /f "delims=: tokens=1*" %%a in ('dir /ad /b^|findstr /n .') do set "userVar%%a=%%b"
popd

:: display all
set userVar
pause


Regards
aGerman
by aGerman
04 Jun 2010 08:09
Forum: DOS Batch Forum
Topic: How to use Windows .bat to edit contents of a file
Replies: 8
Views: 5996

Re: How to use Windows .bat to edit contents of a file

The command line should be something like that: "Xchange.vbs" "Thai.html" -l "/english/english1.htm" -l "/thai/thai1.htm" Use the entire path for the .vbs and .html files if they are not in the same folder like your batch file. Regards aGerman
by aGerman
04 Jun 2010 07:02
Forum: DOS Batch Forum
Topic: New to the batch - Folder removal
Replies: 6
Views: 2791

Re: New to the batch - Folder removal

Try this

Code: Select all

cd "%userprofile%\Application Data\Sun\Java" || goto :eof


Regards
aGerman
by aGerman
03 Jun 2010 11:42
Forum: DOS Batch Forum
Topic: How to use Windows .bat to edit contents of a file
Replies: 8
Views: 5996

Re: How to use Windows .bat to edit contents of a file

Thai, this is a batch forum and thats why maybe I shouldn't say that, but: Don't use a batch file for replacements in websites. The main reason is that you have to read / replace / write it line by line. But a line into the source text could be too long for batch. Another reason is that you have to ...
by aGerman
03 Jun 2010 08:37
Forum: DOS Batch Forum
Topic: dos rename
Replies: 1
Views: 1606

Re: dos rename

adk This should be your Excel formula: =CONCATENATE("rename ","""",I2,""" """,J2,"""") The result of this formula (into your excel sheet) should be: rename "01 HCK01.tif" "Vol 1.tif" This result you c...
by aGerman
02 Jun 2010 14:51
Forum: DOS Batch Forum
Topic: Echoing '|' Doesnt work
Replies: 5
Views: 2823

Re: Echoing '|' Doesnt work

Another possibility could be to use frame characters. Try this

Code: Select all

@echo off &setlocal
chcp 437>nul
echo.
echo ÉÍËÍ»
echo º1º2º
echo ÌÍÎ͹
echo º3º4º
echo ÈÍÊͼ
echo.
echo ÚÄÂÄ¿
echo ³1³2³
echo ÃÄÅÄ´
echo ³3³4³
echo ÀÄÁÄÙ
echo.
pause


Regards
aGerman
by aGerman
02 Jun 2010 12:29
Forum: DOS Batch Forum
Topic: Whats 2>%1
Replies: 5
Views: 2381

Re: Whats 2>%1

:lol: Yeah, jeb ... I'm absolutely certain that you need a batch tutorial :lol:

OK, for you, other Germans an not for aGermans :mrgreen:
a tut collection
a good forum

Regards
a( )German
by aGerman
02 Jun 2010 11:29
Forum: DOS Batch Forum
Topic: Whats 2>%1
Replies: 5
Views: 2381

Re: Whats 2>%1

Hi aGerman Thx for replying Is there any document or page in which i can read more about batch? I would like to start doing some examples. Calvo Well, my nickname is not a joke. I could give you some good links to german tutorials, but I think it would be senseless for you But you are on http://www...
by aGerman
02 Jun 2010 11:17
Forum: DOS Batch Forum
Topic: Flash task bar button
Replies: 6
Views: 2870

Re: Flash task bar button

I wrote a small example for. It's tested only on XP. There are some explanations into the code, I hope you will know what you have to change. It is important that you set the number of steps (pbCalcBase) and that you call the subroutine :pb after each step in your code. @echo off &setlocal :: **...
by aGerman
02 Jun 2010 06:20
Forum: DOS Batch Forum
Topic: Sum output from file?
Replies: 2
Views: 1611

Re: Sum output from file?

Try this: set /A tot=0 for /f "tokens=1" %%a in (file.txt) do ( set /A tot+=%%a ) echo %tot% otherwise the variable %tot% will not be changed during the run tim of the for loop. echo %var% and echo.%var% is allmost the same. If var is not defined (has no value) you will get a message if yo...
by aGerman
01 Jun 2010 13:35
Forum: DOS Batch Forum
Topic: Batch File to Search and Copy Results
Replies: 2
Views: 2194

Re: Batch File to Search and Copy Results

You could try something like that: @echo off &setlocal set /p "SEARCHTERM=Enter the Search Term: " set /p "DATEINPUT=Enter the Date (Ex: 2010-05-27) " md "C:\ByDate\%DATEINPUT%" 2>nul cd "C:\TotalListOfTerms" >"C:\ByDate\%DATEINPUT%\%SEARCHTERM%.txt&q...
by aGerman
01 Jun 2010 11:28
Forum: DOS Batch Forum
Topic: Embed objects
Replies: 1
Views: 1330

Re: Embed objects

No, this is impossible. The only things a batch window can show are characters.

Regards
aGerman
by aGerman
01 Jun 2010 11:24
Forum: DOS Batch Forum
Topic: Echoing '|' Doesnt work
Replies: 5
Views: 2823

Re: Echoing '|' Doesnt work

What exactly does output mean? Your standard output is the the batch window. The pipe (|) is for redirecting the stdOut of one command to a second command.

Regards
aGerman
by aGerman
01 Jun 2010 11:18
Forum: DOS Batch Forum
Topic: Whats 2>%1
Replies: 5
Views: 2381

Re: Whats 2>%1

Well, > is for redirecting of an output to a file or a device (eg. printer, screen, NUL). 2 is for redirecting the stdErr (error message) 3 is an user defined channel %1 is the first argument you gave to the batch process I've never seen 2>@1 because this will create a file named "@1" But ...