10/11/09 13:36
steven991
Ragazzi ho un modulo che prende il nome del computer
e lo chiama con la stringa getNomeComputer.
Ora il mio programma uppa un file chiamato ciao.htm sul mio server ftp chiamandolo ciao.htm.
Ora essendo presente il modulo sopra citato, se scrivo
nomefile = "getComputerName.htm" il file me lo chiama sull'ftp proprio getComputerName.htm e non con la variabile del nome del computer. Come posso farei in modo che il nome del file sull'ftp lo prenda dalla variabile e che lo metta .htm?
Private Declare Function GetComputerName Lib "kernel32" _ Alias "GetComputerNameA" (ByVal sBuffer As String, lSize As Long) As Long Function getNomeComputer() Dim strString As String Dim lunghezzaStringa As Long lunghezzaStringa = 32 'La lunghezza massima del nome di un computer dovrebbe essere 31 caratteri strString = String(lunghezzaStringa, " ") GetComputerName strString, lunghezzaStringa strString = Left(strString, lunghezzaStringa) getNomeComputer = strString End Function
e lo chiama con la stringa getNomeComputer.
Ora il mio programma uppa un file chiamato ciao.htm sul mio server ftp chiamandolo ciao.htm.
nomefile = "ciao.htm" Inet1.Execute Inet1.URL, "PUT C:\ciao.htm " & nomefile
Ora essendo presente il modulo sopra citato, se scrivo
nomefile = "getComputerName.htm" il file me lo chiama sull'ftp proprio getComputerName.htm e non con la variabile del nome del computer. Come posso farei in modo che il nome del file sull'ftp lo prenda dalla variabile e che lo metta .htm?
aaa