Re: searching for the highest index within a directory
From: Ada (Ada_at_discussions.microsoft.com)
Date: 03/03/05
- Next message: Carlos J. Quintero [.NET MVP]: "Re: How to hide code in the assembly?"
- Previous message: Sharon: "How can I hide the SMTP authentication data?"
- In reply to: Cor Ligthert: "Re: searching for the highest index within a directory"
- Next in thread: Cor Ligthert: "Re: searching for the highest index within a directory"
- Reply: Cor Ligthert: "Re: searching for the highest index within a directory"
- Reply: Nick Malik [Microsoft]: "Re: searching for the highest index within a directory"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 3 Mar 2005 02:29:01 -0800
Cor, thanks for the snippet.
according to your snippet, doesn't it create an array for all the files
inside that directory and not just the "testFile_xx"?
Nick, to answer your question....
it's a small exercise for myself. :-)
an application for this type of naming is a sequential graphic animation
files.
i'm doing this to avoid overwriting the existing file and resume sequence
from the highest index file.
can you elaborate why
testFile_4
comes after
testFile_34?
"Cor Ligthert" wrote:
> Ada,
>
> You mean something as this?
>
> \\\
> DirectoryInfo di = new DirectoryInfo(@"c:\");
> FileSystemInfo[] dirs = di.GetFiles();
> string[] str = new string[dirs.Length];
> for (int i = 0;i < dirs.Length;i++)
> {str[i] = dirs[i].Name;}
> Array.Sort(str);
> MessageBox.Show(str[str.Length-1]);
> ///
>
> I hope this helps?
>
> Cor
>
>
>
- Next message: Carlos J. Quintero [.NET MVP]: "Re: How to hide code in the assembly?"
- Previous message: Sharon: "How can I hide the SMTP authentication data?"
- In reply to: Cor Ligthert: "Re: searching for the highest index within a directory"
- Next in thread: Cor Ligthert: "Re: searching for the highest index within a directory"
- Reply: Cor Ligthert: "Re: searching for the highest index within a directory"
- Reply: Nick Malik [Microsoft]: "Re: searching for the highest index within a directory"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|