How to extract file name from file path name?

前端 未结 5 990
粉色の甜心
粉色の甜心 2020-12-20 11:09

I need to move all files from source folder to destination folder. How can I easily extract file name from file path name?

string newPath = \"C:\\\\NewPath\"         


        
5条回答
  •  失恋的感觉
    2020-12-20 11:23

    You may want to try the FileInfo.MoveTo method (code example at the following link):

    http://msdn.microsoft.com/en-us/library/system.io.fileinfo.moveto.aspx

提交回复
热议问题