Attempting to loop a text array while performing an action on each element
I am attempting to perform a file copy action upon each element in a string array. My current problem is how to execute the loop. I found the following somewhere but it doesn't even compile. Part of the problem, I am sure, is that 'file' is a String value and java.lang.string.* does not contain an Iterator method. So, how do I execute the loop?
dataDir = new File(context.getDataDirectory()); //I get the physical directory
String files[] = dataDir.list(); //I load the contents of the directory into an array
//Now I need to loop through each file in the directory and execute my copyToData method
for(Iterator iter = files.iterator(); iter.hasNext();)
{
String e = (String)iter.next();
// shell and/or vbscripts must be copied into the data directory of the channel
copyToData(context, e);

