21 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
0
answers
144
views
Cancel movefile operation
I tried to schedule a movefile (using the sysinternals tool movefile) operation to delete "C:\ProgramData\Microsoft\Windows Defender\Definition Updates\Backup" but I forgot the quotes and ...
0
votes
0
answers
40
views
Cannot programmatically remove any image files using ::DeleteFile or "remove"
I cannot delete a jpg, png or bmp using Windows DeleteFile or remove. I can, however, delete other types of files in the same directory (txt, yaml). To make things even weirder, I can open a command ...
0
votes
0
answers
978
views
Access is denied error while moving file using MoveFileEx on Windows
I am using MoveFileEx() API to move an existing file to a new file. I'm executing below program multiple times via a script.
Below program creates a unique file on every execution, and moves it to ...
0
votes
0
answers
586
views
MoveFileEx not delete file after reboot
Someone could explain why MoveFileEx on following code not delete files after reboot? thanks.
program Project1;
{$APPTYPE CONSOLE}
{$R *.res}
uses
Winapi.Windows,
System.SysUtils;
var
...
user avatar
user13342561
0
votes
1
answer
984
views
Windows C++: Folder moving Access Denied error
The code below is a snippet from my project that among other things:
Gets a collection of folder contents from a specified local folder (The Upload folder)
Copies the contained files to a remote ...
0
votes
1
answer
64
views
File move access denied caused by VS2013 project settings (maybe?)
I'm having trouble with an application which moves files from one location to another, using the Windows API. The problem isn't the code, it appears to be the project settings, but I don't know what ...
4
votes
0
answers
2k
views
MoveFileEx with MOVEFILE_REPLACE_EXISTING flag Fails with LastError = 183
We have an application that makes a backup of a configuration file by copying it to a sub-folder (see log file entry below) using the following command:-
BOOL b = MoveFileEx(ExistingFileSpec, ...
1
vote
0
answers
313
views
Simulate UNIX rename() with Win32 MoveFileEx() for directories
I want to simulate a specific case of the UNIX rename() function to rename directories. Its MAN page specifies:
oldpath can specify a directory. In this case, newpath must either not exist, or it ...
0
votes
1
answer
124
views
relocate a dynamic file in VBA
I am trying to have an user select a file and choose a to upload to another location ( like a shared drive). I am using the name function but I realized I am having trouble getting the file name and ...
0
votes
1
answer
577
views
How to open text files and move them to a folder using VBA?
I need some help with a project in which I must open a list of text files, find a pattern in their contents and then move to other folders according to the pattern.
For example, in a list of text ...
0
votes
2
answers
2k
views
MoveFileEx() returns ERROR_SHARING_VIOLATION
I'm developing a program which could do live-update to modules of our main program.
If the main exe is running, it needs to
1) rename it to temporary name, eg: %productpath%\main.exe -> %...
0
votes
0
answers
209
views
Delete records from Windows registry after MoveFileEx added them
In my software I am using MoveFileEx to mark my files for deletion to be deleted on system reboot.
That is in the case when for some reasons I cannot delete the file with my software (for example it ...
4
votes
1
answer
16k
views
Copy everything from a source directory to a new directory Delphi EX7
My end goal is to copy all the relevant files from one folder to another. So e.g. we have C:\Users\Tool\Desktop\test\oldStuff. In the folder oldStuff we have more folders as well as some mp3,mp4 and ...
2
votes
1
answer
3k
views
MoveFileEx - returning GetLastError(): 17
I'm using MoveFileEx to move a file. depending on what the user inputs, where it moves the files might be on a seperate hard drive. under this circumstance MoveFileEx fails with GetLastError reporting ...
3
votes
2
answers
3k
views
Delete non empty folder on reboot
I am attempting to delete user profile folders in the Users folder after I remove the user from the domain. The problem is some times the folder may be in use by the system.
The problem is using ...