An electronic device comprising: a touch screen display; an input/output interface connectable to an external device; a memory; and at least one processor electrically connected to the touch screen display, the input/output interface, and the memory, wherein the at least one processor is configured to: if the electronic device is connected through the input/output interface to the external device using an operating system different from an operating system of the electronic device, transmit a request to the external device to output a screen associated with the electronic device within a window displayed in a first region of a display of the external device; transmit a request to the external device to output a sub-window corresponding to at least one application stored in the electronic device within the window; receive, from the external device, information indicating an input to the sub-window, and determine a target application based on the received information; set data reception path information based on a feature of the target application and transmit the set data reception path information to the external device, wherein the data reception path information specifies a location in the memory in which data received from the external device corresponding to the input is to be stored; and receive and store data corresponding to the input from the external device based on the data reception path information, wherein the feature of the target application includes information about whether the target application supports data copying or whether the target application supports data attachment, and wherein the target application is one of a file management-based application or a message-based application, and file management-based applications support data copying and message-based applications support data attachment. a touch screen display; an input/output interface connectable to an external device; a memory; and at least one processor electrically connected to the touch screen display, the input/output interface, and the memory, wherein the at least one processor is configured to: if the electronic device is connected through the input/output interface to the external device using an operating system different from an operating system of the electronic device, transmit a request to the external device to output a screen associated with the electronic device within a window displayed in a first region of a display of the external device; transmit a request to the external device to output a sub-window corresponding to at least one application stored in the electronic device within the window; receive, from the external device, information indicating an input to the sub-window, and determine a target application based on the received information; set data reception path information based on a feature of the target application and transmit the set data reception path information to the external device, wherein the data reception path information specifies a location in the memory in which data received from the external device corresponding to the input is to be stored; and receive and store data corresponding to the input from the external device based on the data reception path information, if the electronic device is connected through the input/output interface to the external device using an operating system different from an operating system of the electronic device, transmit a request to the external device to output a screen associated with the electronic device within a window displayed in a first region of a display of the external device; transmit a request to the external device to output a sub-window corresponding to at least one application stored in the electronic device within the window; receive, from the external device, information indicating an input to the sub-window, and determine a target application based on the received information; set data reception path information based on a feature of the target application and transmit the set data reception path information to the external device, wherein the data reception path information specifies a location in the memory in which data received from the external device corresponding to the input is to be stored; and receive and store data corresponding to the input from the external device based on the data reception path information, wherein the feature of the target application includes information about whether the target application supports data copying or whether the target application supports data attachment, and wherein the target application is one of a file management-based application or a message-based application, and file management-based applications support data copying and message-based applications support data attachment.