{Vb.net}Create, Move, Copy, Rename File/Folder (Directory) Detailed Tutorial

preview_player
Показать описание

Hello and welcome to another quick VB.net tutorial, today i will be teaching you all how to send to use file and directory operations and also i m providing links here, so that u don't have to pause video everytime
Codes:

Thanks for watching


Please rate, Comment and Subscribe

Add me on SKYPE where I can help you with your codes : IloveProgramming4u
Рекомендации по теме
Комментарии
Автор

@MrVbdude
thanks for youre comment that helps me very much... and it was a good video

tousisat
Автор

how about if you rename a file or directory base on the time/day for example you put a label for the date and time once you click the rename button then automatically the current date/time will be the name of the folder??? Coz base on my observation on your code the file name was premade  "c:\test.txt"... how can you change the "text" into a something that base on the label??? thanx

benedictcoles
Автор

@MrTrickyProducktions use the kill statement :

there is a way to do it with multiple files but it is a bit advanced and requires dependancies so use this way for every file...

Aliferopoulos
Автор

nice video i have a question... i have a folderbrowser so i can select the folder i want to copy... so i tell it to CopyDirectory(FolderBrowser1.SelectedPath, "C:\") but when i trigger it it copys the fiels in the directory not copying the whole directory their.

ArkaneShrimp
Автор

Hello, do you have a tutorial on how to create and label multi column list boxes?

cattie
Автор

on the delete folder thing, io have a folder i want to delete, but there is some files in it, and my VB gives me an error becouse there is files in it, can it be posibble to make a file remover that first delete all thoes files and then deletes the folder?

MrTrickyProducktions
Автор

great job..
Plz help me. How to move folder from one place to another particular place in vb. plz give code or demo video.

jakhanofficial
Автор

Hi mate great tutorial but i have a question and i am in great hurry so please answer. i have a file in my resources and i want to copy it to a folder in c:\ (i know it won't work on vista/7 because of admin rights and i know how to fix that) i have this code : Dim Location As String
Location = "C:\Program Files\Test\"
System.IO.File.Copy(My.Resources.test.txt, Location)
and it throws a message that illegal characters exist and highlights the line above
please

Aliferopoulos
Автор

How will i create a sub folder in the folder i've create and how will i save something in it....plz help me out....

Fatimah
Автор

Can u pls help me what are the codes for creating media player on visual basic 2010 i am just a beginner and i want to know how to add items directly to my listbox (mp3) if i press (mp3 button) all of my mp3 song will show on my listbox... pls help me and one more i want to add equalizer on it and seekbar connected to" AxWindowsMediaPlayer1" i will be waiting for ur answer ...thanks alot

addcarlosvelasquez
Автор

Will this work with Visual Basic 2010, or is VB.net something else?

dapizz
Автор

thx for this tut. but i have the problem, that the rename method often doesnt work. i have this code:
Dim bf As String = & "\EA GAMES\BF2"
Dim bf141 As String = ... 1.41"
Dim bf15 As String = ...1.5"
If Directory.Exists(bf15) Then
Directory.Move(bf, bf141)
If Directory.Exists(bf141) Then
Directory.Move(bf15, bf)
can you help me?

WilsonKS
Автор

very easy make that.i can do that easily

askiled
Автор

@MrVbdude don't worry, i've subscibed to you... ;)

tousisat
Автор

@plo435 thats a pretty good question....and many people are looking for answer..alright, all u have to do is

Dim path As String = Application.ExecutablePath

First of all i would recommend you to create a blank form and add a button to it..now double click that button and type in this code:

- Just to know how Application.ExecutablePath Works =)..And please RATE and SUBSCRIBE if i helped u any how..
Thanks man =)

MrVbdude
Автор

@dapizz1 VB.net (Visual Basic .net) So yes it will work in Visual Basic 2010, 2008, 2005 :)

MrVbdude
Автор

@tousisat1 You're welcome :) Make sure you subscribe if you learned anything from my videos. If you don't want to subscribe, that's perfectly fine too :D

MrVbdude
Автор

Is it possible for me to copy directory to same folder as the .exe is in?

ManniLive
Автор

@RCGamerKing Hi, that will be easy to answer...ok wat u gotta do is type in ur button event..or watever u doing

My.computer.filesystem.CopyDirectory("C:\TestDirectory1", "C:\TestDirectory2", True)

There is no need to type in (selectedpath) and make sure u don't type "C:\TestDirectory1\" cause it will copy the files in that folder...so just type in "C:\TestDirectory"...and not "\"..!

Thanks and please subscribe if u can...! I make a lot of helpful Vb.net Videos =) :P

MrVbdude
Автор

how do i move the contents of one folder to another folder without deleting the original folder they were in?
heres my code:

 My.Computer.FileSystem.MoveDirectory("Folder1", "Folder2")

It moves all the files that are in Folder1 to Folder2 just fine. But it deletes Folder1.
But I want Folder 1 to stay. Anyone know how to fix this? Preferably without changing my code completely??

buddyroach
welcome to shbcf.ru