Path: csiph.com!news.fcku.it!aioe.org!.POSTED!not-for-mail From: Tommy Newsgroups: it.comp.lang.visual-basic Subject: aiuto su codice vbs Date: Thu, 29 Dec 2016 15:20:48 +0100 Organization: Aioe.org NNTP Server Lines: 56 Message-ID: NNTP-Posting-Host: pbI4GCBOs63Is9gG4VaLsw.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46 X-Notice: Filtered by postfilter v. 0.8.2 X-Mozilla-News-Host: news://news.aioe.org:119 Xref: csiph.com it.comp.lang.visual-basic:18943 ciao, una cosa da vero principiante... ho il sequente pezzo di codice: if Fso.FolderExists ("D:\000") then FSO.CopyFolder "D:\000", CopiaCDsuHD end if if Fso.FolderExists ("D:\CDSURF") then FSO.CopyFolder "D:\CDSURF", CopiaCDsuHD end if if Fso.FolderExists ("D:\DATA") then FSO.CopyFolder "D:\DATA", CopiaCDsuHD end if if Fso.FolderExists ("D:\DICOM") then FSO.CopyFolder "D:\DICOM", CopiaCDsuHD end if if Fso.FolderExists ("D:\FILESET") then FSO.CopyFolder "D:\FILESET", CopiaCDsuHD end if if Fso.FolderExists ("D:\IMAGES") then FSO.CopyFolder "D:\IMAGES", CopiaCDsuHD end if if Fso.FolderExists ("D:\studies") then FSO.CopyFolder "D:\studies", CopiaCDsuHD end if if Fso.FolderExists ("D:\_STUDIES") then FSO.CopyFolder "D:\_STUDIES", CopiaCDsuHD end if if Fso.FolderExists ("D:\study000") then FSO.CopyFolder "D:\study000", CopiaCDsuHD end if per ognuna delle condizioni, qualora venga trovata una delle 9 cartelle elencate (es. "D:\DICOM" o "D:\IMAGES" ecc. ecc.) tale cartella viene copiata su hard disk tramite il comando CopiaCDsuHD è possibile riscrivere il codice in modo più "sintetico" ovvero anzichè ripetere 9 blocchi di codice quasi uguali, averne uno solo che dice che qualora una qualunque di quelle 9 cartelle sia presente su CD va ricopiata su HD? ho provato con if Fso.FolderExists ("D:\IMAGES") or ("D:\DICOM") or ecc. ecc. ma non funzionava grazie Tommy