Connect to an offline wifi router and an online wifi router at the same time

For Windows 7 or 10, I’d like to connect a computer to Wifi router that is internet-connected while also being connected to another Wifi router that is not internet-connected.

The purpose of the offline Wifi is for Wifi-based file transfers between devices.

Is there a way to do this?