0

I'm writing a script in python.

I want to create a symlink to a file that doesn't exist.

os.symlink fails in this case.

Is there a way to force to link?

msterious
  • 5
  • 1
  • What OS are you on? `os.symlink` seems to be able to do this on MacOS and Linux. Can you provide a [mre]? – pcarter Nov 01 '20 at 23:15
  • Does this help? https://stackoverflow.com/questions/1762831/create-broken-symlink-with-python – Sztyler Nov 01 '20 at 23:17
  • As a little workaround: just create a new empty file at the destination, create the symlink and delete the file? – seven_seas Nov 02 '20 at 02:47

0 Answers0