MakeDir
MakeDir FolderName$
 
Parameters:

    FolderName$ = The Folder name of the directory you wish to create
Returns: NONE
 

      MakeDir will create a new directory.



FACTS:


      * Before you use MakeDir, always check if the FolderName doesn't already exist. If you try and overwrite an existing directory that previously existed, PB will stop and return a run time error.



Mini Tutorial:


      This example will create a blank file on the C: Drive called "TestFile.txt" , it then displays the info about this file and then removes itself.


  
; Get the location of the windows Temp dir
  ThisDir$=TempDir$()+"PB_MakeDir_Test"
  
; Check if the FOlder Already exists ?
  If FolderExist(ThisDir$)=false
     
   ; Display a message that we've created a Temp Dir
     Print "Creating Temp dir at:"+ThisDir$
     
   ; Create a Directory called PB_MarkDir_Test in
   ; the WindowsTemp folder
     MakeDir ThisDir$
     
  EndIf
  
; Check if the FOlder exists ?  if so, delete it
  If FolderExist(ThisDir$)=true Then DeleteDir ThisDir$
  
  
; Display the screen and wait for a key press
  Sync
  WaitKey
  
  


This example would output.

  
  Creating Temp dir at:C:\Windows\Temp\PB_MakeDir_Test
  

 
Related Info: :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com