It's not possible to do this without any component cost. Scrapping a weapon destroys its mods.
But it shouldn't take long to find a few spare weapons, break them down, and make enough components for a swap at a relatively low component cost. If you can manage to afford the Level 1 Scrapper perk this gets even easier.
It sounds like you might know how to do this already, but in case it helps you or others—let's say you have a Powerful Receiver mod on pistol A, and you want to move it to pistol B.
- At the weapons workbench, select Pistol A, select the Standard Receiver mod, then choose Build. Though this isn't free, it's really pretty component-cheap.
- Look in your inventory to confirm. You should see a Powerful Receiver mod in the Mods inventory tab. This mod is now available to apply to other pistols.
- At the crafting bench, choose Pistol B and navigate to the Powerful Receiver mod. Since you already have one, instead of Build you'll see an option to Attach.
In researching the related question How can I break items down into their components, I saw a complaint on Reddit to the effect that the extra, leftover materials get destroyed.
Why this is a common belief
Many people seem to believe this, and there's a good reason for that: it's confusing. And it's confusing for two reasons:
- The composite item is removed from your character's inventory, but the leftover components are placed in the Workshop's inventory.
- There's sometimes a delay before the leftover components reappear. If you want to speed up the process: go into Workshop mode, try to build something, and then exit. This appears to force the Workshop to update its inventory contents list.
Go, science!
I settled the question with science. I've tested this with various items a dozen or so times using the Armor Workbench, the Weapons Workbench, and the Workshop crafting menu.
The leftover components have always (so far) appeared in the Workshop inventory, but there's sometimes a delay.
Here's one of the experiments:
Experiment
- Remove all Lead from your inventory and the Workshop's inventory.
- Add two pencils to your inventory; each pencil has 1 Lead and 1 Wood.
- Go into the Wood Structure crafting menu—not to craft anything but just to check your Wood component count.
- Craft a Radiation Emitter, which among other things requires 2 Lead.
By creating the Emitter, we force the Workbench to dismantle the pencils, which liberates 2 Wood and 2 Lead.
If our Wood component count goes down, wood has been lost/destroyed. If it stays the same, our 2 "potential" units of Wood have simply been converted into 2 actual units of Wood.
Result
Our Wood component count remains unchanged. So unneeded materials are retained, just as though you'd broken the item down yourself.
Best Answer
Actually you can put all your junk directly in your workshop and just leave it there, you never have to pick it back up before crafting.
With all your junk in your inventory, simply interact with your workshop and press the button to "Store all junk" (Y on Xbox controller) and it will automatically store ALL your junk in your workshop. You can then still transfer some back to your inventory if you wish.
Normally this works only for a single settlement (junk/ressources are shared throughout every workshop/crafting station of said settlement) -- the junk is only where you've left it. You can however get "Local Leader" perks which enables you to set up trade routes which allow for sharing junk between settlements.