User2008642861 posted
Hi coder91,
From your post, I agree with your idea. As I understand, you want to retrieve files without their extension. If so, please check the below case.
http://stackoverflow.com/questions/4804990/c-sharp-getting-file-names-without-extensions
Above case suggests that you could use
Path.GetFileNameWithoutExtension Method .
coder91
Just want some advice if this looks correct and how I can go about only retrieving the 4 files at a time and how I can increment the filename to retrieve the correct files.
Besides, about above requirement, I think it depend on the files' names. If the names of files is like the example you give, that's to say, their names are just number, I suggest that you could convert the name to int, and plus 1, then concert it to string
as the parameter.
int filenum = convert.Int32(filename);
filenum +=1 ;
filename = filenum,toString();
If the files' names are not number, I think it may not be incremented. Or you could convert it to int.
Hope this could be helpful to you.
Best regards,
Archer