Eli Zaretskii writes: > A better error message would be > > (error "Cannot copy `%s' into its subdirectory `%s'" from to) Done Have fixed commented block in `dired-create-files', have a look. > I don't understand why you use expand-file-name here: file-truename > does it for you anyway. Fixed. > Suggest to modify the doc string as follows: Done. Have modified `file-subdir-of-p' according to your advices. Please have a look. (Tested with success on windows also) (file-subdir-of-p "/" "/") works now. > Finally, it looks like this function only works when its two arguments > already exist; when they don't, it returns nil. If this is the > intent, it should be reflected in the doc string. Fixed docstring. Fixed `copy-directory' by doing another check of `file-subdir-of-p' after creation of the non--existing subdir. Thanks for this.