Change in file name C # WIN FORM

0

In the code below I have two strings, one of them is a path of my database, in which I can already compress through a method that I have created, until then ok, but I would like that in each check it changes to a name different, in order never to generate repetition of name. Follow the Code:

string sourceDbSpec = @"C:\Users\GrowTec\Desktop\OffShore.accdb";
string destinationDbSpec = @"C:\Users\GrowTec\Desktop\OffShore2.accdb";

if(destinationDbSpec == destinationDbSpec)
   {               
     destinationDbSpec.Replace(@"C:\Users\GrowTec\Desktop\OffShore.accdb", 
                               @"C:\Users\GrowTec\Desktop\OffShore2.accdb");

   }
    
asked by anonymous 29.11.2017 / 18:44

0 answers