Need advice for Raspberry pi app

Hi guys!

I’m really new to the programming world.
Ive done a couple of arduino program with succes, but all the GUI I currently have zero experience.

I’m currently looking for a solution to create a GUI application for the raspberry pi that will read the usb ports.

It’s a simple application that can transfer the data from one USB drive to the other.
That it.

No other thing involve for the moment.
No formating the USB or anything.

I just want to program to take USB 1 and transfert everyting to USB 2.

Can somebody help me on that.
Where to start, what I need to learn for doing that?!

Thanks.
Jc

Hi JC,

Check out the ‘CopyFileOrFolder method’ example on http://documentation.xojo.com/index.php/FolderItem

  • You’d create a Folder Item for USB 1 and USB 2.
  • Delete all the items on USB 2
  • Then run ‘CopyFileOrFolder’ to copy the files.

There might be an even easier shell command that you could run.

Hi! Thanks, ill check it clossely 2night.

The other thing.
It’s possible to use the same target for different source.

Exemple. I will have a USB of 32go to backup to a USB hard drive of 500go.

If I have 2 other 32go USB I don’t want to delete the 500go hard drive.
I don’t know if you follow me.

I want to be able to do multiple backup to the 500go.

Yep. Just make the Destination Folder Item different. You can create folders using: http://documentation.xojo.com/index.php/FolderItem.CreateAsFolder

Ok thanks.

Last thing, do you have a int how to mount the USB drive?

I was planing to have a drop menu with the usb drive plug inside the raspberry.

I guest I need to go with the serial protocol?

That’s beyond me, but I bet the MBS Plugin can do it:
http://www.monkeybreadsoftware.net/plugins-mbsusbplugin.shtml

Plug the drives into the Raspberry Pi and see if they appear under the VolumeCount and Volume http://documentation.xojo.com/index.php/Volume. If so, then it’s a simple FolderItem FileCopyTo http://documentation.xojo.com/index.php/FolderItem.CopyFileTo

If you are copying large files your UI will be unresponsive during CopyFileTo. If you need more find control you’ll have to do be Binary copy in a thread but that’s it’s not worth talking about unless you have the issue.

Hi Bob K.
Thanks for the reply.

First I don’t care if the device is not responsive during the process.

If I can make a progress bar that will work it will be a plus, but it’s not really a big issus if not.

Last thing Ill check if the drive appear inside the VolumeCount.

I don’t think it will for all the device. (Mac, PC formated hard drive, ) and for the other usb (the source) it’s a SD card that coming from a camera.
So a format only for the camera.

Ill do some test and let you know!

If you have other info ill be please to know it!
Thanks.

Hi guys. First i was abke to mount the device with a button.
3 problem here.
First when i reclick on the button. It show me the same drive but 2 time(exemple i have 2 usb plug inside)
It will show me 2 times the 2 usb.
What can i do to refresh and not just double the drive in the list.
Second i dont know how to have the file on the usb display on a list and doing multiselection.
Third im lost in the copyfile.
If somebody is willing to write the code for me.im ready to offer a money compensation.
Thanks

[quote=290041:@Jean-Christophe Meilleur]First when i reclick on the button. It show me the same drive but 2 time(exemple i have 2 usb plug inside)
It will show me 2 times the 2 usb.
What can i do to refresh and not just double the drive in the list.
[/quote]

listbox.removeallelements before updating

there are examples on how to copy a file in the help file, also in the examples folder

[quote=290041:@Jean-Christophe Meilleur]Second i dont know how to have the file on the usb display on a list and doing multiselection.
[/quote]
choose “multiline selection” on the listbox properties