Sign in to follow this  
Followers 0
senorita

StringInsert

2 posts in this topic

#include <File.au3>
#include <array.au3>
$path="file.txt"
$fileArray = Fileopen($path,1)
For $X = 1 to $fileArray[0]
    _StringInsert($path,"helloworld\",$fileArray[0])
Next
FileClose($path)

please help to debug the code

my file.txt contains

File.txt

-------------

peter

seoul

trinity

...

..

paster

I want like this

File.txt

----------------

helloworld\peter

helloworld\seoul

helloworld\trinity

....

..

helloworld\paster

So if any other method please quote here

and please help me with it

Share this post


Link to post
Share on other sites



Sounds like you just want to concatenate the strings?

For $X = 1 to $fileArray[0]
    $fileArray[0] = "helloworld\" & $fileArray[0]
Next

Also you're using FileOpen() wrong, see helpfile. You may want to check _FileReadToArray() too.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0