In recent years there has been a growing interest in studying giant molecular filaments (GMFs), which are extremely elongated (> 100pc in length) giant molecular clouds (GMCs). They are often seen as inter-arm features in external spiral galaxies, but have been tentatively associated with spiral arms when viewed in the Milky Way. In this paper, we study the time evolution of GMFs in a high-resolution section of a spiral galaxy simulation, and their link with spiral arm GMCs and star formation, over a period of 11Myrs. The GMFs generally survive the inter-arm passage, although they are subject to a number of processes (e.g. star formation, stellar feedback and differential rotation) which can break the giant filamentary structure into smaller sections. The GMFs are not gravitationally bound clouds as a whole, but are, to some extent, confined by external pressure. Once they reach the spiral arms, the GMFs tend to evolve into more substructured spiral arm GMCs, suggesting that GMFs may be precursors to arm GMCs. Here, they become incorporated into the more complex and almost continuum molecular medium that makes up the gaseous spiral arm. Instead of retaining a clear filamentary shape, their shapes are distorted both by their climb up the spiral potential and their interaction with the gas within the spiral arm. The GMFs do tend to become aligned with the spiral arms just before they enter them (when they reach the minimum of the spiral potential), which could account for the observations of GMFs in the Milky Way.