Folder in use cannot move

broken image
broken image

If MoveFile() returns FALSE, you need to call GetLastError() to find out why it fails. You cannot use drag-and-drop a folder from your computer onto your Moodle course page, but you can drag-and-drop a. Which is rare on a NTFS filesystem, as moving a file from one folder to another folder on the same drive will just relocate the file reference and not move the actual file data. In my case, Process Explorer was not able to find the handle, but the Resource Monitor (see other answer) was capable. there was an error while moving the data.

broken image

MoveFile(input1.c_str(), input2.c_str()) // <- SUCCEEDS Std::string input2 = 'C:\\Users\\\\Desktop\\New Folder\\link.txt' std::string input1 = 'C:\\Users\\\\link.txt' Moving to an external drive: You can move your Sync folder to a USB attached external drive to free up space on your internal drive and/or provide more storage. MoveFile() returns TRUE, and the file is actually moved. With my project configured for ANSI/MBCS instead of Unicode (thus allowing std::string::c_str() to be passable to the TCHAR-based MoveFile() macro), the exact code shown (only replacing the Username with my own) works perfectly fine for me.