Make sure both devices are on "Private" network.
On both the devices:
Open Control Panel > Network and Sharing Center > Change advanced sharing settings
Enable Network Discovery
Enable File and Printer Sharing
Turn off Password Protected Sharing
Right-click folder > Properties > Sharing > Advanced Sharing > Share
Allow File & Printer Sharing in firewall settings.
Make sure the following services are running:
Function Discovery Provider Host
Server
Workstation