HydrogenAudio

Hosted Forums => foobar2000 => General - (fb2k) => Topic started by: fuffi on 2019-10-20 06:51:27

Title: 1.5b19 '[x] Remove empty source folders' dont work, when file exists on dest.
Post by: fuffi on 2019-10-20 06:51:27
Hi,

I move files from C:\mp3\sub\... to \\server\mp3\sub\... via "File Operation MenĂ¼".

[ x ] Remove empty source folders is active and it works well, if no error occours on moving.

If an error occours, say, the destination folder and files already exists, then non of the (empty) folders are deleted from source disk as shown in the preview.

Example:

I move
C:\mp3\sub\folder1\a.mp3
C:\mp3\sub\folder2\a.mp3
C:\mp3\sub\folder3\a.mp3
to
\\server\mp3\sub\folder1\a.mp3
\\server\mp3\sub\folder2\a.mp3
\\server\mp3\sub\folder3\a.mp3

If, say
\\server\mp3\sub\folder2\a.mp3
already exists, then
C:\mp3\sub\folder1\
C:\mp3\sub\folder2\
C:\mp3\sub\folder3\
are not removed.

Its accepted, that C:\mp3\sub\folder2\ is not removed, but all other folders should, because they had no problem :-)

Can anyone reproduce this, please?

(I have special UFT-8 Chars in the foldernames and the number of subdirecoties vary a lot, of course)
Title: Re: 1.5b19 '[x] Remove empty source folders' dont work, when file exists on dest.
Post by: Peter on 2019-10-21 11:12:51
Problem noted, thanks for reporting.
If you look at the preview of operations that are about to be done, it probably wants to delete the whole parent folder - which would turn up containing nothing but empty subfolders if nothing failed.
Title: Re: 1.5b19 '[x] Remove empty source folders' dont work, when file exists on dest.
Post by: fuffi on 2019-10-24 13:59:28
it probably wants to delete the whole parent folder - which would turn up containing nothing but empty subfolders if nothing failed.
f2k did not only wants to delete the parent folder, IT DID in many cases (also using v1.4.x) deleted my very important root/parent folder.
IIRC, I made that folder R/O, but it was very irritating, because, IMHO, that behaviour came with v1.4.x and older version did not deleted the root/parent folder.
Title: Re: 1.5b19 '[x] Remove empty source folders' dont work, when file exists on dest.
Post by: frogworth on 2019-11-04 01:59:15
f2k did not only wants to delete the parent folder, IT DID in many cases (also using v1.4.x) deleted my very important root/parent folder.
IIRC, I made that folder R/O, but it was very irritating, because, IMHO, that behaviour came with v1.4.x and older version did not deleted the root/parent folder.

I would expect empty parent folders to be deleted - say I'm moving an entire top-level artist to a new location, I don't want an empty folder leftover.
I have an "incoming" folder and to stop this happening I just created an empty text file called __do-not-delete-parent.txt.
Title: Re: 1.5b19 '[x] Remove empty source folders' dont work, when file exists on dest.
Post by: fuffi on 2019-11-06 22:01:56
I would expect empty parent folders to be deleted
Same here,
unless that folder is indexed by the media library.

(f2k tries to remove that folder, but throws an error, because the folder is in use, when monitoring is set up in the folder prefs.
When no monitoring is set up, strange things happen...don't try)


I just created an empty text file called __do-not-delete-parent.txt.
That should do the same as marking that folder ReadOnly.
unless you activate [ x ] move entire source folder content in the File Operations Setup window, which will then "re"move your textfile too...