Can I go for Visa interview with another company's petition than original company which filed H1 B?

Hi.

My H1 B is approved this year and I am based in India. Company A had filed for my H1 B. But I want to join company B. Before going to the visa stamping, can I have the H1 B transferred to Company B before going for the visa interview or is it safer to have it stamped with Company A, travel to US and then do the shift to Company B?

Both options are possible. B can file cap-exempt petition for you now and then you can appear for stamping through B and travel to US to work for B. Talk to B about their preference and timing.

Thanks Saurabh, but for B to file, in addition to having the Petition Case Number I must have the I-797 original form also to be available with me in India right?Right now A has my original I-797 document though I know the Case/Petition Number.