Finder traces the recent folders and files under /Users/<user>/Library/Preferences/com.apple.finder.plist. The file is in binary format and can be viewed with defaults read <file>. A better parsing can be done with the library plistlib.
/Users/<user>/Library/Preferences/com.apple.finder.plist
defaults read <file>
plistlib
Interesting fields :
FXRecentFolders
NewWindowTargetPath
RecentMoveAndCopyDestinations
Last updated 3 years ago