Can anyone say while creating a text file on a remote server or a PC, through which port it speaks to .
It doesn't. FSO is for local, or locally mapped drives only.
you can access other computers using FSO, but shares MUST be mapped drives. Network communication is not provided for by FSO.