I have some code where I’m attempting to create a temporary file to be used as a zip file.
string tempPath = Path.GetTempFileName();
string targetPath =
string.Concat(Path.GetTempPath(),"//",Path.GetFileNameWithoutExtension(tempPath),".zip");
File.Move(tempPath, targetPath);
However a new file is being created instead of moving (renaming) the temp file.
I’m definitely confused…
Kevin
I think this is what you’re looking for:
FileInfo.MoveTo()