Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Foreign Languages > Italian Forum
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Come identificare la root del dispositivo

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-05-2009, 01:07 AM
Junior Member
 
Join Date: Mar 2008
Posts: 46
Default Come identificare la root del dispositivo

Salve a tutti,
ho la necessità di identificare il path della "root" del dispositivo (un palmare). In pratica, se cerco di copiare un file in questo modo:

FileCopy (AppPath & "\prova.txt", "\Windows\prova.txt", True)

l'operazione non va a buon fine, in quanto il path "\Windows\prova.txt" può o non può essere corretto (dipende dalla posizione dell'exe, e quindi da AppPath).
E' da un paio di ore che ci sbatto la testa, mi rendo conto che la soluzione sarà anche banale, ma proprio non riesco a venirne a capo con qualcosa di semplice... un aiuto?
Reply With Quote
  #2 (permalink)  
Old 02-05-2009, 07:11 AM
Filippo's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Schwäb. Gmünd, Germany
Posts: 977
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Ciao Raytracer,

hai provato con "if DirExist ("\Windows")=true then ...." ?


Ciao,
Filippo
__________________
PPC: MDA Pro, 2GB SD
Device: HTC Desire , Android 2.2
______________________
Reply With Quote
  #3 (permalink)  
Old 02-05-2009, 09:52 AM
Junior Member
 
Join Date: Mar 2008
Posts: 46
Default

Ciao Filippo,
grazie per la risposta. Sì, avevo pensato a quell'istruzione, ma non mi risolve il problema purtroppo. Il percorso di installazione potrebbe essere il più svariato in base alle scelte dell'Utente, e non posso prevedere ogni possibilità...
L'esigenza mi sembra così semplice che non posso credere non vi sia un'istruzione in B4PPC che possa servire allo scopo... sono più portato a pensare che sia io a non trovare il comando adatto...
Reply With Quote
  #4 (permalink)  
Old 02-05-2009, 10:10 AM
Filippo's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Schwäb. Gmünd, Germany
Posts: 977
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
l'operazione non va a buon fine, in quanto il path "\Windows\prova.txt" può o non può essere corretto (dipende dalla posizione dell'exe, e quindi da AppPath).
scusa, man non capisco! Se dipende da AppPath perchè non fai così?
FileCopy (AppPath & "\prova.txt", AppPath & "\Windows\prova.txt", True)

o sono complettamente fuori?
__________________
PPC: MDA Pro, 2GB SD
Device: HTC Desire , Android 2.2
______________________
Reply With Quote
  #5 (permalink)  
Old 02-05-2009, 10:18 AM
Junior Member
 
Join Date: Mar 2008
Posts: 46
Default

L'applicazione potrebbe essere installata ovunque, anche su Scheda di Memoria. Se scrivessi

FileCopy (AppPath & "\prova.txt", AppPath & "\Windows\prova.txt", True)

risolverei solo il caso in cui essa sia installata proprio nella root, ma non andrebbe bene in tutti gli altri casi.
Reply With Quote
  #6 (permalink)  
Old 02-05-2009, 10:25 AM
Filippo's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Schwäb. Gmünd, Germany
Posts: 977
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Ci sarebbe pure http://www.basic4ppc.com/forum/offic...der-files.html,
io non l`ho ancora usato, ma potrebbe quello che cerchi.
__________________
PPC: MDA Pro, 2GB SD
Device: HTC Desire , Android 2.2
______________________
Reply With Quote
  #7 (permalink)  
Old 02-05-2009, 11:59 AM
Junior Member
 
Join Date: Mar 2008
Posts: 46
Default

Errore mia, chiedo venia. L'istruzione

FileCopy (AppPath & "\prova.txt", AppPath & "\Windows\prova.txt", True)

copia il file prova.txt esattamente dove deve, dentro \Windows.
Un errore di trascrizione nella routine (più complessa di quella scritta qui) mi aveva messo fuori strada...
Reply With Quote
  #8 (permalink)  
Old 02-05-2009, 01:00 PM
Filippo's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Schwäb. Gmünd, Germany
Posts: 977
Awards Showcase
Beta Tester 
Total Awards: 1
Default

puo capitare ...
L' importante è che adesso funziona.
__________________
PPC: MDA Pro, 2GB SD
Device: HTC Desire , Android 2.2
______________________
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Root Directory to see progs colin9876 Questions (Windows Mobile) 2 11-16-2007 10:04 AM


All times are GMT. The time now is 12:12 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0