Hi All,
I had a problem with sending of multiple files (in fact of the whole
tree of directories) to my mobile via obexftp.
I've managed to solve it with the following very simple script (for
Python on Linux):
#!/usr/bin/python
import os
cmd="obexftp -b your_mobile_bt_address_or_name -C E:"
#The line above is customized for sending of the files to the SD/MMC
#card in my mobile. You may need to modify it!
for f in os.walk("."):
for d in f[1]:
#This is directory
cmd1=cmd+f[0][1:]+"/"+d
print cmd1
os.system(cmd1)
for fl in f[2]:
#This is a file
cmd1=cmd+f[0][1:]+" -p "+f[0]+"/"+fl
print cmd1
os.system(cmd1)
The script sends all the files and the directories down from the current
directory, and puts them into
the same directory structure on the SD/MMC card (E:) on the mobile.
Probably this script is not fully multiplatform ready, and maybe it is
not protected against "malicious" filenames (e.g. containing spaces or
special characters, which could disturb the operation of "os.system"
command), however it was very usefull for me, so I'd like to provide it
as a public domain contribution for other openobex users.
--
HTH & Regards,
Wojtek
[EMAIL PROTECTED]
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Openobex-users mailing list
[email protected]
http://lists.sourceforge.net/lists/listinfo/openobex-users