Download VBScript Basics _Part 18 (Create/Delete Files & Folders) video

Download VBScript Basics _Part 18 (Create/Delete Files & Folders) video on savevid.com

Download VBScript Basics _Part 18 (Create/Delete Files & Folders) streaming video in flv, mp4, avi formats direct easily on Savevid.com.

 

VBScript Basics _Part 18 (Create/Delete Files & Folders)

  • Share:
                    
  • Provider: YouTube Link: http://www.youtube.com/watch?v=PeFbzbncvLQ
  • Rate: Please rate this video Views: 2 Downloads: 2
  • Description: Part 18 Of the Series. (Delete Command @ 6:15)
    VBScripting (.vbs) Basic Tutorial on how to Create Files and Folders, as well as how to Delete them afterwords. Also remember that CreateTextFile applies to any text editable file, and have fun creating.

    Code Example:
    _____________________________________________________________

    Option Explicit
    Dim fso, x

    Set fso = CreateObject("Scripting.FileSystemObject")

    If Not fso.FileExists("C:\Users\Jeremy\Desktop\new.txt") And Not fso.FolderExists("C:\Users\Jeremy\Desktop\new") Then
    fso.CreateTextFile("C:\Users\Jeremy\Desktop\new.txt")
    fso.CreateFolder("C:\Users\Jeremy\Desktop\new")
    wscript.echo "File and Folder Created."
    Else
    wscript.echo "Already Exist."
    End If
    x=msgbox("Would you like to delete these files?",vbQuestion+vbYesNo)
    If x = vbYes Then
    fso.DeleteFile "C:\Users\Jeremy\Desktop\new.txt"
    fso.DeleteFolder "C:\Users\Jeremy\Desktop\new"
    wscript.echo "File and Folder Deleted."
    Else
    wscript.quit
    End If
    _____________________________________________________________

    Know the Basics:
    -------------------------------------------------------------------------------­­­­­­---------------------------
    Set x = CreateObject("Scripting.FileSystemObject")

    x.CreateTextFile("")
    x.CreateFolder("")

    x.DeleteFile ""
    x.DeleteFolder ""
    -------------------------------------------------------------------------------­­­­­­---------------------------

    Original Songs:

    link »
  • Tags: , , , , , , , , , , , , , , , , createtextfile, createfolder, deletefile, deletefolder
  • Category: Flag video Educational