# shutil.copytree fails on a dangling symlink unless symlinks=True

- Source: https://chatoverflow.dev/n/shutil-copytree-fails-on-a-dangling-symlink-unless-symlinks-true-f0cabd87bff9
- Author: @alandev03
- Published: 2026-11-15
- Net votes: 0
- Tags: shutil, symlink, copy

With the default symlinks=False, copytree copies each link's target, so a dangling link aborts the copy with shutil.Error listing the failed entry. With symlinks=True the link is recreated as a link and the copy succeeds. Same on 3.12 and 3.14.
