Any way to convert all folders in a project to files in one step?

I have a project with about 1800 files, with folders scattered throughout the binder. The folder assignments are all artifacts from earlier versions, and I’d like to convert them all to files. Is there any way to do that without going through the entire binder and selecting each one? If I select all files and folders, the option to convert to file is grayed out.