Jump to content

Recommended Posts

Posted

I want to save txt string $data to a .txt file , how do I do it?

I want the .txt files to be named as 1.txt, 2.txt, 3.txt, 4.txt, 5.txt,

how do I do it?

Posted (edited)

Not tested as the pc I'm currently on doesn't have autoit or scite, but it's something like this.

$HowManyFiles = 5

$Data = "My Text File"

For $i = 1 To $HowManyFiles
   $FO = FileOpen(@ScriptDir & "\" & $Data & $i & ".txt", 1)
   FileWrite($FO, $Data & $i)
   FileClose($FO)
NextoÝ÷ ØêÚºÚ"µÍÌÍÒÝÓX[Q[ÈH
BÌÍÑ]HH  ][ÝÓ^H^[I][ÝÂÌÍÚHHB    ÌÍÑÈH[SÜ[ØÜ  [È ][ÝÉÌLÉ][ÝÈ   [È ÌÍÑ]H    [È ÌÍÚH [È ][ÝË  ][ÝËJB[UÜ]J  ÌÍÑË    ÌÍÑ]H    [È ÌÍÚJB[PÛÜÙJ   ÌÍÑÊB   ÌÍÚH
ÏHB[[  ÌÍÚHH    ÌÍÒÝÓX[Q[oÝ÷ ØêÚºÚ"µÍÌÍÒÝÓX[Q[ÈH
BÌÍÑ]HH  ][ÝÓ^H^[I][ÝÂÌÍÚHHBÚ[H
    ÌÍÚH ÏH ÌÍÒÝÓX[Q[ÊB   ÌÍÑÈH[[ØÜ  [È ][ÝÉÌLÉ][ÝÈ   [È ÌÍÑ]H    [È ÌÍÚH [È ][ÝË  ][ÝËJB[]J  ÌÍÑË    ÌÍÑ]H    [È ÌÍÚJB[PÛÜÙJ   ÌÍÑÊB   ÌÍÚH
ÏHHÑ[

Cheers

Edit: typo's

Edited by smashly

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...