Re: about iterative loop to write numbers into file
- From: "McKirahan" <News@xxxxxxxxxxxxx>
- Date: Tue, 13 Nov 2007 21:09:37 -0600
"Alexander Mueller" <millerax@xxxxxxxxxxx> wrote in message
news:473a4459$0$27122$9b4e6d93@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
crazyfisher schrieb:iterative
Dear all,
just wondering is it possible to create a VBS script that uses an
textloop to write the numbers from 1.0 to 1.9, then 2.0 to 2.9 etc up to a
file?
How could I do that ?
Thanks !!!
Here's a shell script, numbers.cmd:
@ECHO OFF
SET F=%TMP%\numbers.txt
ECHO. > %F%
setlocal enabledelayedexpansion
FOR /L %%A in (1,1,99) do (
IF %%A LSS 10 (
SET S=0%%A
) ELSE (
SET S=%%A
)
ECHO !S:~,-1!.!S:~-1! >> %F%
)
endlocal
TYPE %F%
Alex, the OP asked for a VBScript ....
For i = 1.0 To 3.0 Step 0.1 : s = s & FormatNumber(i,1) & vbCrLf : Next
CreateObject("Scripting.FileSystemObject").CreateTextFile("i.txt",True).Writ
e(s)
.
- Follow-Ups:
- Re: about iterative loop to write numbers into file
- From: Alexander Mueller
- Re: about iterative loop to write numbers into file
- References:
- Re: about iterative loop to write numbers into file
- From: Alexander Mueller
- Re: about iterative loop to write numbers into file
- Prev by Date: Re: Calling VBScript file from a VBScript file and passing arg's
- Next by Date: Change user and IE font size Terminal Server
- Previous by thread: Re: about iterative loop to write numbers into file
- Next by thread: Re: about iterative loop to write numbers into file
- Index(es):
Relevant Pages
|
Loading