RollingFileAppender RollFile Method | Apache log4net™ SDK Documentation

Renames file fromFile to file toFile.

Namespace: log4net.Appender
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    protected void RollFile(
    	string fromFile,
    	string toFile
    )

    Protected Sub RollFile (
    	fromFile As String,
    	toFile As String
    )

    protected:
    void RollFile(
    	String^ fromFile,
    	String^ toFile
    )

    member RollFile :
            fromFile : string *
            toFile : string -> unit

#### Parameters

fromFile
  Type: System
  String
  Name of existing file to roll.
toFile
  Type: System
  String
  New name for file.

Remarks

Renames file fromFile to file toFile. It also checks for existence of target file and deletes if it does.

See Also

#### Reference

RollingFileAppender Class
log4net.Appender Namespace