Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > it.comp.lang.visual-basic > #19831
| Path | csiph.com!news.mixmin.net!aioe.org!.POSTED.x5JIxJnkLIUW+0c1S4xFqg.user.gioia.aioe.org!not-for-mail |
|---|---|
| From | Paperino <non_te@lo.dico.invalid> |
| Newsgroups | it.comp.lang.visual-basic |
| Subject | Re: Scorrere listbox ed eliminare files |
| Date | Fri, 2 Oct 2020 17:37:28 +0200 |
| Organization | Aioe.org NNTP Server |
| Lines | 22 |
| Message-ID | <rl7hfp$1uh$1@gioia.aioe.org> (permalink) |
| References | <e18a0fb9-cc04-4db5-a377-8765472b433en@googlegroups.com> |
| NNTP-Posting-Host | x5JIxJnkLIUW+0c1S4xFqg.user.gioia.aioe.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8bit |
| X-Complaints-To | abuse@aioe.org |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 |
| Content-Language | it |
| X-Notice | Filtered by postfilter v. 0.9.2 |
| Xref | csiph.com it.comp.lang.visual-basic:19831 |
Show key headers only | View raw
Marco75 ha scritto: > ciao, > ho la necessità di eliminare dei files da una cartella. > tali file corrispondono a quelli presenti in una listbox per cui devo scorrere la listbox ed eliminare i file (nome file e item listbox sono identici). > ho provato con questo codice ma i file non vengono eliminati: > > For Each i As String In listbox1.Items.ToString > > Dim FileToDelete As String > FileToDelete = "C:\Cartella di test" & i metti qui un debug.print filetodelete e vedi cosa esce. Penso che scoprirai che ti sei scordato il backslash fra il nome della cartella e il nome del file ;-) > If System.IO.File.Exists(FileToDelete) = True Then > System.IO.File.Delete(FileToDelete) > End If > > Next Bye, G.
Back to it.comp.lang.visual-basic | Previous | Next — Previous in thread | Next in thread | Find similar
Scorrere listbox ed eliminare files Marco75 <marcoporzi75@gmail.com> - 2020-10-02 03:48 -0700
Re: Scorrere listbox ed eliminare files Paperino <non_te@lo.dico.invalid> - 2020-10-02 17:37 +0200
Re: Scorrere listbox ed eliminare files Marco75 <marcoporzi75@gmail.com> - 2020-10-05 23:17 -0700
Re: Scorrere listbox ed eliminare files Marco75 <marcoporzi75@gmail.com> - 2020-10-16 06:38 -0700
Re: Scorrere listbox ed eliminare files Marco75 <marcoporzi75@gmail.com> - 2020-10-16 06:50 -0700
Re: Scorrere listbox ed eliminare files Marco75 <marcoporzi75@gmail.com> - 2020-10-20 07:23 -0700
Re: Scorrere listbox ed eliminare files Franz_aRTiglio <franzgol@N0SPAMtin.it> - 2020-10-20 21:15 +0200
csiph-web