LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   How to transmit a file by source-code to USB drive (https://www.linuxquestions.org/questions/programming-9/how-to-transmit-a-file-by-source-code-to-usb-drive-811466/)

1sir 06-01-2010 07:50 AM

How to transmit a file by source-code to USB drive
 
Hi guys,

I want to find a simple and quick way to permit my application to bring a file located in my file system and write it into an external USB device. I have to use Bulk Transfer Only mode that means to use stream of characters only. I looked through the LibUsb library using it in my IDE I can transmit a string.

To transfer a whole file I suppose I've to dodge the file system building a char sequence that permits to recognise a file in the file system and to put it into the usb device.

Suggestions? :Pengy: Cheers..


Note I'm working with Ubuntu 10.04

1sir 06-02-2010 06:00 AM

Solved!

It works with system("/bin/cp -p /tmp/footbar /mnt/footbar")


All times are GMT -5. The time now is 11:05 AM.