Sign in to follow this  
Followers 0
Max in montreal

using a variable in a file name

2 posts in this topic

I am trying to see if certain files exist. These files are called 1.txt, 2.txt, 3.txt...

using this:

If FileExists("sonysonylineup1.txt") Then do something.

How can I replace the 1 in the filename with a variable in the line above?

Thanks in advance for the help!

Max

Share this post


Link to post
Share on other sites



This will get you started.

Local $var = 1
Do
    If FileExists("\\sony\sony\lineup\" & $var & ".txt") Then do something
    $var = $var + 1
Until 0

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