#include <filesystem> namespace fs = std::filesystem; int main() { fs::copy("C:sandboxfile1.txt", "C:sandboxfile2.txt"); // copy file }