Depends on a number of factors:
First, it depends how good the file is. I remember listening to a file years ago for making it easier to go into hypnosis. I listened so many times and it never worked. It just said stuff like "you will find it easier to be hypnotized". Why would that work? Theres no reason for it to work, and plenty of reasons it wont (future tense, unimaginative, not inspiring, not descriptive...)
It depends how easy you are to hypnotize. A small percentage of people can be hypnotized by just about anything.
It depends on the goal. Changing your body will take more dedication. Changing your mind could take half a session. Unrooting deep mindsets could take multiple files, or a strategy that is beyond any of the files you currently see. It may take a customized file, or a mental therapy treatment of some sort. It could take lots of practice.
Like if I want to do curse force gay or a feminization file. What’s the longest it usually takes for a file to work?
For those files, if you're not noticing any effects at all after a couple listens, it's not going to work on you.