Can I store the initialisation vector (IV) in the filename? I'm encrypting a file and I'm using an initialisation vector. Given that the IV doesn't need to be a secret, is it secure if I add it to the encrypted file's name?
Yes, you can store the IV any way you want.  Putting it in the file name is no different from putting it in the file contents.

(Actually, there's nothing specific to cryptography here.  You could take any file you want and decide to move, say, the first $n$ bytes of its content into the file name.  It's all just data.)

That said, as SEJPM notes in the comments, to protect your data from tampering you really should use some form of authenticated encryption (either with a bespoke AE mode, or using the generic Encrypt-then-MAC construction), and you do need to include the IV in the authenticated data, no matter where it's stored.

The risk here is that, depending on the cipher mode used, tampering with the IV could allow an attacker to modify the plaintext in more or less predictable ways.  Even if decrypting with the wrong IV just produces gibberish, an attacker may be able to combine this with other attacks to learn something about the plaintext, especially if your code leaks information about the "gibberish" on decryption failure.  Using authenticated encryption protects you from this.

Also, a practical risk with storing data in the file name is that people are much more likely to rename files than to randomly tamper with their contents (especially if the contents just looks like random binary data).  Thus, using the file name to store critical data like the IV could lead to an increased risk of accidental data loss or corruption.