giovedì 1 agosto 2013

crea file cartella temporanea - vbs

'

' vbs.

' Crea nome di un file temporaneo.

' visualizza il percorsso della cartella temp.

' visualizza il percorso/path del file temporaneo.

'

Option Explicit

'

Dim strTempFile

Dim strTempFolder

Dim strTemp

dim tipofile

tipofile = ".fdf"



Dim fso

Set fso = CreateObject("Scripting.FileSystemObject")

Set strTempfolder = fso.GetSpecialFolder(2)

strTempFile = fso.GetTempName()

strTempFile = left(strTempFile, len(strTempFile)-4)

strTemp = strTempFolder & "\" & strTempFile & tipofile



dim s

s = ""



s = s & "Nome File Temporaneo: " & strTempFile & vbcrlf

s = s & "Nome Cartella Temporanea: " & strTempFolder & vbcrlf

s = s & "Percorso/Path file temporaneo: " & strTemp & vbcrlf



msgbox s

Nessun commento:

Posta un commento