Of course there is - just put the file into the desired folders on disk.
Unfortuantely, that's not all there is to it. You also have to change the file's object location (or name) - because by default, VS dumps all object files from a project into one directory, regardless of where they were on disk originally. The object file location for a source file is accessed through that source file's properties. Go to Properties > C/C++ > Output Files > Object File Name
.