PDA

View Full Version : [VB6] Aiuto...verifica se la cartella esiste!


jackk87
05-12-2008, 11:20
Buongiorno,
ho la necessita di verificare se una cartella esiste perchè devo cercare i file in essa. ma ho il seguente problema:

dir1=Environ$("USERPROFILE") & "\Impostazioni locali\Dati applicazioni\Microsoft\Messenger\"

If dir(dir1) = "" Then

dove dir1 è una stringa ma non mi restituisce nessun valore è sempre nulla mentre se scrivo:


If dir("C:\Documents and Settings\Account\Impostazioni locali\Dati applicazioni\Microsoft\Messenger\") = "" Then

così funziona cioè se la cartella c'è mi da un valore quindi riesco a controllare però io non so il nome dell'account che è connesso quindi mi servirebbe salvarlo in una variabile ho provato anche con i file system ma sempre lo stesso problema qualcuno sa darmi una mano?grazie :help:

MarcoGG
05-12-2008, 11:30
Environ$("computername") = nome macchina.
Environ$("username") = nome account utente.

;)

Hardware Upgrade Forum Database Error
Database Error Database error
The Hardware Upgrade Forum database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.hwupgrade.it home page, then try to open another page.
  • Click the Back button to try another link.
The www.hwupgrade.it forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.