Monday, 15 February 2010

Move a file to under a directory using C# -



Move a file to under a directory using C# -

string str = "c:\\efe.txt"; string dir = "d:\\";

i want move or re-create "efe.txt" file under "d:\" directory. how can that.

thanks advice.....

as others have mentioned want utilize file.move, given input you'll want utilize path.combine , path.getfilename so

string str = "c:\\efe.txt"; string dir = "d:\\"; file.move(str, path.combine(dir, path.getfilename(str)));

c# file copy folder move

No comments:

Post a Comment