ciao a tutti!
dovrei fare una getFolder su un percorso remoto (per poi fare la copia dei file presenti nella directory remota in una dir locale),
ma viene fuori un errore:
errore 76 - Impossibile trovare il percorso
questo è il codice:
------------------------------------------
' copia dati
if strCopy <> "" then
if right(strCopy,1) = "," then
strCopy = left(strCopy,len(strCopy)-1)
end if
arrCopy = split(strCopy,",")
Set fso = CreateObject("Scripting.FileSystemObject")
for i = 0 to ubound(arrCopy)
tmpSource = strSource & arrCopy(i) & "*"
tmpDest = strDest & arrCopy(i)
response.write "ACC info=" & strSource & arrCopy(i) & "\" & chr(13) & chr(10)
Set folder = fso.getfolder(strSource & arrCopy(i) & "\")
if err.number <>0 then
response.write "ERR_READ=" & err.description
end if
for each file in folder.files
response.write file.name & chr(13) & chr(10)
next
' fso.CopyFolder tmpSource,tmpDest,true
' if err.number <>0 then
' response.write "ERR_COPY=" & err.description
' end if
response.write "OK copia - " & tmpSource & " IN " & tmpDest & chr(13) & chr(10)
next
end if
response.end
' fine copia
---------------------
dove strSource e strDest sono le directory interessate alla copia, e strCopy è 1 stringa contenente i nomi delle sottodir di strSource da copiare, separate da "," (vedi utilizzo split)
consigli?
gezie in anticipo!

Rispondi quotando