How to move a file that has no file extension? C# -


if (file.exists(@"c:\\users" + environment.username + "\\desktop\\test")) {                                                                /\                                                file has no file extension }           

the file test has no extension , need either move or rename file extension

having no extension has no bearing on function. also, rename move "in disguise", want

file.move(@"c:\users\username\desktop\test", @"c:\users\username\desktop\potato.txt") 

please bear in mind @ before string, haven't escaped backslashes.


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -