Create New Folder

annir

Active member
Joined
Sep 1, 2008
Messages
32
Programming Experience
Beginner
Hi Guys,

Does anyone know on how to create a new folder. And it will require the user where he/she will create it?

I have a Dirlistbox, then for example the user open a folder from the Dirlistbox then she/he decides that they want to create a folder in that path.

does anyone have an idea on this one?

thanks!

annir
 
System.IO namespace is a good place to look for all IO functionality, you have brief knowledge of it from a previous thread. The My feature this is also something all beginners should have a look at, try for example to write "My.Computer.FileSystem." - what do you see?
 
Rename Folder

Hi Guys,

Can I ask if it is possible that when the user select a folder from Dirlistbox then they want that folder to rename it?

Any idea on this one?

Thanks!

annir
 
Can I ask if it is possible that when the user select a folder from Dirlistbox then they want that folder to rename it?
Same answer as post 3. If you go for the System.IO approach you will discover that "rename" is really a "move" operation.
 
Hi johnh,

thanks! I'm able to rename the folder, but how in the file? how can I rename the file inside the Filelistbox?

I used this but have an error:

PHP:
My.Computer.FileSystem.RenameFile(FileListBox1.FileName.ToString, TextBox1.Text)

and also how can I preserved the file extension of that file (what file type of that file ex: .pdf, .doc, etc

Thanks!

annir
 
Last edited:
Look into the System.IO.Path namespace, there's some filename and file extension handling stuff in there
 
Back
Top