Here are the steps to achieve this :
Go to Devices and Printers
Click on "Add Printers"
Click on "Add a local or network printer as an administrator"
Click on "Add a local printer"
Click on Create a new port: Local Port
You will get a Port Name Box - Type in Path and the file name
Select the Manufacturer - Generic
Select Printers - Generic / Text Only
elect - Use the driver that is currently installed (recommended)
Type a name for the printer.
Share the Printer if needed
After doing this, any print jobs sent to this printer will automatically be saved to the location specified as the port.