I have a program where I create a temp file in %USERPROFILE%\AppData\Local\Temp, and I then call rename.c’s _wrename() function to effectively move that file to a directory which is encrypted with Windows’ EFS. The problem is that this file doesn’t inherit that directory’s encryption settings. Is there any way to overcome this (I don’t want to encrypt the Temp folder, btw)?
I have a program where I create a temp file in %USERPROFILE%\AppData\Local\Temp, and I
Share
I believe you want to use the Win32 functions instead of the C functions. I’m unsure if
MoveFileExwill do what you want.CopyFileExcan be used to do this, and it’s then possible to delete the original.CopyFileExeven has flags which allow it to fail/not if encryption is not possible at the destination.