GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Another 'The Directory is not Empty. (145)' scenario


#1

I am getting the 'directory is not empty (145)' message in the following scenario. The scenario appears to duplicate and then alter my files - Im guessing this is not expected behavior. Forgive the detail - trying to provide enough info for the steps to make sense.

I have Opus open with two different folders in the display. Both folders are pointing to network drives on the same windows server. They are different shares pointing to different physical hard drives on the server. My client is Windows 10 with all latest patches.

I store all my Gopro video files here, so I have a long list of folders, each folder holding at least 1 large (>5GB) file. Some folders have multiple files. The folder I am moving in this example has one large file and one small file.

I am using a right mouse click on the left pane and selecting a folder that contains two files. I drag the folder to its target location in the right pane. As Im dragging a small bit of text appears attached to the cursor saying '+ copy to ' and when I drop the folder in target I get a menu because Im using the right click. On the menu I select Move. Im expecting the entire folder with all contents to move to the target location.

The Moving dialog box appears and I can see the bits moving across. When the progress bar hits 99% the bar turns red and I get the error: "An error occurred moving : The directory is not empty. (145)'

At the time of the error the one small file is left in the old location, and both files appear in the right pane in the new location. Clicking 'retry' doesnt change the state, and clicking 'Skip' closes the dialog box.

However now Im left with the two files intact in the new location in the right pane, but in the origination location I am left with the one small file with a smaller file size and a modified time stamp of now. It appears this has altered my file in some way. MD5 on each file is now different between the two locations.

Hoping someone can explain to me what is happening here, it doesnt seem right that I be left with a residual file that has been altered.

Thanks. Mark


#2

Opus doesn't modify the source file at all when copying or moving.

To move files between hard drives it's necessary to copy the file first, and then delete the original. It sounds like the file that was left behind was opened and modified by something else after Opus had finished copying it but before it was able to delete it.

If it happens regularly you could try using Process Monitor to see what else is accessing the file.


#3

Hi Jon,

Thanks for the reply. That was a great idea.

Set up on the server side to watch the source folder with process monitor while copying. Turns out it was indeed the scenario you describe - some of the files Im moving are movies - and I have Plex server running on the same server. When Plex saw the new movie file appear in the new location it immediately went searching for metadata files (including subtitle files) and downloading them. This placed files in the target folder at the same time the move was still underway.

In one specific example - Plex pulled a newer instance of a subtitle file, and that newer file was a different filesize than the one in my old source. So thats why I saw files with different dates and filesizes. They did in fact have different originations.

Thanks again! Mark