What are the VB.NET directory operation statements?
Editor to share with you what the VB.NET directory operation statements, I believe that most people do not know much, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
1. Create a new VB.NET directory (MkDir statement)
Format: Mk:Dir
Function: create a new directory.
For example: create a VBl directory on D disk.
MkDir "D:\ VBl"
2. Change the current drive (ChDrive statement)
Format: ChI) rive
Function: change the current drive.
Note: if Drive is ", the current drive will not change; if there are multiple characters in the Drive, ChDfive will only use the initials.
For example: change D to the current drive.
ChDrive "D"
3. Change the current directory ((2hDir statement)
Format: ChDir.
Function: change the current directory.
Note: the ChDir statement can only change the default directory location, but not the default drive location.
For example, if the default drive is c, the following statement will change VB in drive D to the default directory, but C will still be the default drive.
ChDir "D:\ VB"
4. Delete VB.NET (directory RmDir statement)
Format: RmDir
Function: delete an existing directory.
Description: the RmDir statement cannot delete a directory that contains files. If you want to delete, you should first delete all files using the kill statement.
For example: delete the VBl directory on D drive.
Kill "D:\ VBl\ ★. ★"
RmDir "D:\ VBl"
5. Determine the current directory drive (CurDir function)
Format: curDir. [(drJve)]
Function: determine the current directory of any drive.
Description: drive means to determine the current directory drive. If drive is "", CurDil' returns the current directory path of the current drive.
These are all the contents of the article "what are the VB.NET directory operation statements?" Thank you for your reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!