(Running a 64bit system your Fallout 4 data folder SHOULD be here: C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data)
Drop this file into your Fallout 4 Data folder, and type the following command in your console:
bat ammoandcraft
It's as simple as that!
Note: As someone pointed out in the comments, it will almost definitely result in you being too heavy to move, so you should run this command while standing near a workshop so you can transfer your items