Yeah, they do, usually around 2^8 to 2^15 characters total. Assuming < 256 chars is usually safe, but check the docs for your OS + filesystem combo.
Most filesystems have a limit on the filename of one element, but many don't have a limit on the depth of directories or the total length of the full path to the file. Some operating systems do have a limit on the length of a fully qualified file name, but you may be able to avoid that by only using relative names.
Windows routinely shows me error if I try to rename/delete/move a file, whose name is within the limit, but the complete path from root including all the folders make it above the limit.