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

java - BeanIO write annotated class to fixedlength -

Using Java 8 lambdas/transformations to combine and flatten two Maps -

How to connect android app to App engine -