Yes you can
You dont need a router to create an Adhoc connection between the two computers for file transfer.
1. make sure the wireless is switched on in both machines
2. on computer 1 click start>ctrl panel>network & Sharing. then click setup a new connection or network
3. after you click “setup a new connection or network” the bottom option is “<i>set up a wireless ad hoc network</i>” select this option
4. name the ad hoc network
5. select the security “if needed”
6. input your own security key “make something up”
7.click next to finish the wizard
Now on the 2nd computer
Open Network & Sharing and click manage wireless networks
select the new ad hoc network
input the security keys “if there are any”
and boom your now connected to computer 1 via wirless without a router or switch.