Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > it.comp.lang.visual-basic > #18538

Re: funzione Dir

From Greg <greg@alicie.com>
Newsgroups it.comp.lang.visual-basic
Subject Re: funzione Dir
Date 2015-10-08 23:48 +0200
Organization news.solani.org
Message-ID <mv6oc3$pl7$1@solani.org> (permalink)
References <mv3mui$grg$1@solani.org> <4cbc1bla3674309egh2l25i74tbvfiiqm8@4ax.com> <mv6g7p$rsn$1@solani.org> <mv6ms4$ce4$1@speranza.aioe.org> <mv6n26$cqu$1@speranza.aioe.org>

Show all headers | View raw


Il 08/10/15 23.26.31 salclem2 ha scritto:
> "salclem2" <salclem2@yahoo.it> nel suo ultimo post si è così espresso:
>> "Greg" <greg@alicie.com> nel suo ultimo post si è così espresso:
>>
>>>
>>>> x& = GetFileAttributes ("G:\miofile.txt")
>>>
>>>> If x& > 0 Then MsgBox ("ESISTE")
>>>
>>> Grazie, alla fine ho usato la funzione Api e va tutto bene, ma vorrei capire perchè non 
>>> funziona la  Dir$ e la Dir
>>> Ho provato a riscriverla cosi:
>>>
>>> Dim aa As String
>>> aa = Dir$("c:\prova.txt")
>>> e restituisce "prova.txt"
>>>
>>> mentre:
>>> aa = Dir$("h:\prova.txt")
>>> da errore 52 numero o nome di file non valido
>>>
>>> -- Greg
>>>
>> Il motivo è semplice, perché esiste il drive H: ma non esiste il file, però se entrambi non 
>> esistono restituisce una stringa vuota.
> Anzi, non proprio non esiste, non è accessibile il drive (es. il cdrom), altrimenti restituisce 
> una stringa vuota.

Ma hai ragione, che sbadato. A furia di non usare più il cd-rom mi ero dimenticato che esistesse.
Invece il drive H: è li, vuoto ma è li.
Quindi la Dir$ può dare 3 risultati, non due! Grazie davvero

-- 
Greg

Back to it.comp.lang.visual-basic | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

funzione Dir Greg <greg@alicie.com> - 2015-10-07 20:05 +0200
  Re: funzione Dir "Freccia (VegetaSSj)" <NIENTESPAMfreccia_vegetassj@hotmail.invalid> - 2015-10-07 22:14 +0200
  Re: funzione Dir Luca D <antaniserse@yahoo.it> - 2015-10-07 13:21 -0700
  Re: funzione Dir "salclem2" <salclem2@yahoo.it> - 2015-10-07 23:27 +0200
  Re: funzione Dir SB <stNOOObenevSPAM@tin.it> - 2015-10-08 10:56 +0200
    Re: funzione Dir Greg <greg@alicie.com> - 2015-10-08 21:29 +0200
      Re: funzione Dir "salclem2" <salclem2@yahoo.it> - 2015-10-08 23:23 +0200
        Re: funzione Dir "salclem2" <salclem2@yahoo.it> - 2015-10-08 23:26 +0200
          Re: funzione Dir Greg <greg@alicie.com> - 2015-10-08 23:48 +0200
    Re: funzione Dir Greg <greg@alicie.com> - 2015-10-09 16:19 +0200
      Re: funzione Dir SB <stNOOObenevSPAM@tin.it> - 2015-10-09 16:38 +0200
        Re: funzione Dir Greg <greg@alicie.com> - 2015-10-11 00:10 +0200
  Re: funzione Dir Greg <greg@alicie.com> - 2015-10-08 13:05 +0200

csiph-web