lundi 23 février 2015

How to change multiple file names in C#?

I have file names that contain numbers that need to be decremented by 1. I need code that satisfies the following pseudocode:



class ReplaceSubstrings
{
string searchFor;
string replaceWith;
Bool filenamecontainnumbers; 'file name contains numbers to be decremented by 1
int filenamenumbers; ' file name size varies from 10 to 500 - I only want to ' target integers 200 - 500

while(filenamecontainsnumbers = 1) ' maybe I should use Bool condition

ReplaceSubstrings app = new ReplaceSubstrings();
If(filenamenumbers > 200){
app.searchFor = filenamenumbers; // A very simple regular expression.
app.replaceWith = decnamenumber();
Console.WriteLine(s);

return 0;

}


void decnamenumber(){

filenamenumbers = filenamenumbers - 1;

};


or something like this!!! Help Please!!!


Aucun commentaire:

Enregistrer un commentaire