DuarteVinagre Posted June 23, 2025 at 06:56 PM Report #634949 Posted June 23, 2025 at 06:56 PM ola...sou novo aqui e este é o meu primeiro post... espero que esteja tudo bem convosco.... passa-se o seguinte...tenho este pequeno codigo mas não consigo por o "move" para cada elemento da Listbox..... ajuda por favor?? Private Sub btninstall_Click(sender As Object, e As EventArgs) Handles btninstall.Click Dim sourceDir = inputfdl.SelectedItems Dim inn = input.Text & "\" & inputfdl.SelectedItem Dim out = bank1.Text & "\" & inputfdl.Text For Each file As String In sourceDir My.Computer.FileSystem.MoveFile(inn, out) Next file Call install() End Sub Obrigado!!
Solution Andrepereira9 Posted June 23, 2025 at 08:49 PM Solution Report #634950 Posted June 23, 2025 at 08:49 PM Boas Pelo que percebi, tens uma Listbox preenchida com nomes dos ficheiros, e queres mover todos os ficheiros que estão na Listbox de uma pasta para outra. Se assim for, experimenta assim: Dim sourceDir = inputfdl.Items For Each file As String In sourceDir Dim inn = input.Text & "\" & file.ToString Dim out = bank1.Text & "\" & file.ToString My.Computer.FileSystem.MoveFile(inn, out) Next file A informática chegou para resolver problemas que antes não existiam Quem ri por último é porque está conectado a 52 Kbs.
DuarteVinagre Posted June 23, 2025 at 08:56 PM Author Report #634951 Posted June 23, 2025 at 08:56 PM boas ...obrigado ....é parecido....queria mover apenas os seleccionados..
DuarteVinagre Posted June 23, 2025 at 08:58 PM Author Report #634952 Posted June 23, 2025 at 08:58 PM ok done...meti o inputfdl.Items para SelectedItems ... parece bem agora...obrigado
DuarteVinagre Posted June 25, 2025 at 05:59 PM Author Report #634962 Posted June 25, 2025 at 05:59 PM Ola pessoal...desculpem mas estou outra vez encalacrado com of for each.. agora passa-se isto: Dim item = list1.SelectedItems For Each fil As String In item Dim wavFile As String = FolderB2.SelectedPath & "\" & list1.SelectedItem & ".wav" Dim mp3File As String = textfold.Text & "\" & list1.SelectedItem & ".mp3" ConvertWavToMp3(wavFile, mp3File) Next Obrigado por qualquer suporte 🙂
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now