Jump to content

An "Array" of Problems....


Recommended Posts

I need to copy the largest file in a directory to another directory. I have copied each file name to an array. The file i copy will ALWAYS be the last number/entry in the array so what i need to do is copy the file that corresponds the the last entry in the array. So i need to say max number in array = file, then copy file.

Link to comment
Share on other sites

I need to copy the largest file in a directory to another directory. I have copied each file name to an array. The file i copy will ALWAYS be the last number/entry in the array so what i need to do is copy the file that corresponds the the last entry in the array. So i need to say max number in array = file, then copy file.

Look up Ubound command in the help file

returns the number of items in your array, just remember to subtract 1 from the result.

The result, should be the last item containing your filename

HTH

HardCopy

Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad

Link to comment
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
 Share

  • Recently Browsing   0 members

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