Rename File

1. Function Documentation:

1.1. Function Defination:

RenameFile

1.2. Function Parameters:

Parameter Defination Parameter Type Parameter Data-Type Parameter Default-Type Parameter Applicable-Value Parameter Description
CurrentFileName Mandatory string None Any string value Name excisting file
NewFileName Mandatory string None Any string value New name for file

1.3. Function Returned Data Data-Type:

void

1.4. Function Returned Value:

N/A

2. Example:

2.1. Complete Code:

            
                ac.RenameFile("~/Files/Dir1/Dir1_1/TextFile1.txt", "~/Files/Dir1/Dir1_1/TextFile2.txt");
            
        

2.2. Code Demonstration:

  1. Call RenameFile function and give it the directory and current file name as a first parameter and the directory path with a new file name.