
Signature
HTH,
Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com
I had the same problem once. Fixed it using the same solution.
> Let's say I have a file loaded, whether it be text or picture.
>
[quoted text clipped - 5 lines]
> (deleting/path designations, etc), but how can I look at the path of that
> first file, which is loaded, and load the next one in the path?
Can you point me to a website that shows how to do this?
I'm kind of lost on how to do it still.....
> The System.IO.Directory.GetFiles() method will return an array of the file
> paths of all the files in the directory. You can work off of that.
[quoted text clipped - 9 lines]
>> (deleting/path designations, etc), but how can I look at the path of that
>> first file, which is loaded, and load the next one in the path?
Markus - 18 Feb 2007 08:35 GMT
>> The System.IO.Directory.GetFiles() method will return an array of
>> the file paths of all the files in the directory. You can work off
>> of that.
>
> Can you point me to a website that shows how to do this? I'm kind of
> lost on how to do it still.....
first get all files, maybe in some init-code:
string[] files = System.IO.Directory.GetFiles();
int currentFile = 0;
then use this list to loop over this:
void OnButtonNextClick(...)
{
currentFile++;
string newFile = files[currentFile];
// do whatever you need with the new file
}
hope this helps
Markus
RobinS - 18 Feb 2007 18:12 GMT
Did you try googling it yourself? Or go search msdn2.com for
system.io.directory.getfiles() ?
Robin S.
--------------------------------------
> Can you point me to a website that shows how to do this?
> I'm kind of lost on how to do it still.....
[quoted text clipped - 13 lines]
>>> that
>>> first file, which is loaded, and load the next one in the path?
Kevin Spencer - 19 Feb 2007 12:30 GMT
Here's the MSDN reference on the System.IO.Directory class. It contains a
number of examples:
http://msdn2.microsoft.com/en-us/library/system.io.directory.aspx

Signature
HTH,
Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com
I had the same problem once. Fixed it using the same solution.
> Can you point me to a website that shows how to do this?
> I'm kind of lost on how to do it still.....
[quoted text clipped - 13 lines]
>>> that
>>> first file, which is loaded, and load the next one in the path?