# Using AsUsb to create a file device inside of USB

**URL:** <https://community.br-automation.com/t/using-asusb-to-create-a-file-device-inside-of-usb/3570>\
**Category:** Controls & Vision\
**Tags:** automation-studio, plc, unsolved\
**Created:** [June 19, 2024, 2:17pm UTC](https://community.br-automation.com/t/using-asusb-to-create-a-file-device-inside-of-usb/3570 "2024-06-19T14:17:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dario.lucas.sousa](https://avatars.discourse-cdn.com/v4/letter/d/FF8800/32.png) [@dario.lucas.sousa](https://community.br-automation.com/u/dario.lucas.sousa)\
**Post date:** [June 19, 2024, 2:17pm UTC](https://community.br-automation.com/t/using-asusb-to-create-a-file-device-inside-of-usb/3570/1 "2024-06-19T14:17:05Z")

</div>

Hello,  
I am trying to use LibAsUSB sample to read a usb directory. First of all, I can access the root directory after create a file device and get the id to read a usb device. But i cannot get the path of usb (In the fuction block devlink, the variable pparam is a pointer to ‘DEVICE=bd0’, but it is not the real path), so i can’t create a file device of one folder inside of the usb. In my application, i want to save a CSV to a folder in the usb, but i just can save in the root, not in a especific folder. Anyone can help me about it? (Sorry for my english, i can explain better if someone have any question). Thanks

---

<div class="post-metadata">

**Author:** ![alexander.hefner](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/alexander.hefner/32/111_2.png) [@alexander.hefner](https://community.br-automation.com/u/alexander.hefner)\
**Post date:** [June 19, 2024, 2:46pm UTC](https://community.br-automation.com/t/using-asusb-to-create-a-file-device-inside-of-usb/3570/2 "2024-06-19T14:46:34Z")

</div>

Hi,

you could try to add the folders name to the file name when using the FileIO functions blocks, please see the following screenshot from the “FileCreate” function block as example (should be usable in that way with all of the [FileIO function blocks](https://help.br-automation.com/#/en/4/libraries/fileio/fbks/fbks_fileio.html)):

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/5/5904813a67111b1504e25af09985e3dfc03d0593.png)

Best regards!

---

<div class="post-metadata">

**Author:** ![kovarj](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/kovarj/32/537_2.png) [@kovarj](https://community.br-automation.com/u/kovarj)\
**Post date:** [July 26, 2024, 12:16pm UTC](https://community.br-automation.com/t/using-asusb-to-create-a-file-device-inside-of-usb/3570/3 "2024-07-26T12:16:58Z")

</div>

Hi , what is the status of your topic? if is it solved, can you marked answer that helps you the most?

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/brcommunity/original/1X/a202d64f0f03e22a662ed33fbbca6879f1efb794.jpeg) [@system](https://community.br-automation.com/u/system)\
**Post date:** [July 27, 2024, 12:38am UTC](https://community.br-automation.com/t/using-asusb-to-create-a-file-device-inside-of-usb/3570/4 "2024-07-27T00:38:48Z")

</div>


