SourceFormatX

Overview

Features

Why Use It

Formatting Show

Integration

Screenshots

Documentation

FAQs & Tips

Update History

Award Gallery

Testimonials

License Policy

CodeMorph

CodeToHtml

VBScript Source Code Formatting Show


SourceFormatX code formatter bases on powerful syntax parse engines so it can beautify and format source code files with omnifarious styles, even these messy source code examples below:

C/C++ Java C# Delphi (Pascal)
PHP JSP ASP JavaScript
Visual Basic VB.NET VBScript HTML Components
80x86 ASM 8051 ASM CORBA IDL


This is an extreme VBScript code formatting example, the purpose of it is to show the power of SourceFormatX's VBScript syntax parse engine. SourceFormatX VBScript Code Formatter is professional code formatting tool for VBScript (VBS).

  '----- Before VBScript Code Formatting -----

  ON ERROR RESUME NEXT:Set fso = CreateObject("Scripting.FileSystemObject"):X=0:T=true:WhiLe T
  Input=Inputbox("Filename Lowercase Batch Convertor"&vbcrlf&vbcrlf& _
  "Please input the destination folder name. e.g. C:\Webmaster"&vbcrlf&vbcrlf& _
  "Note: Do NOT add '\' in the end of folder name!","FLowercase Convertor","C:\")
  iF Input="" then:Msgbox"Folder name is empty!",48,"Error!":T=true:else T=false:end If:wend
  Msgbox"All files names of "&Input&" will be converted to lowercase now...",64,"Note"
  fold(Input):Msgbox"Done! Total "&X&" file(s) were converted to lowercase.",64,"Done"
  sub fold(Path):SET f=fso.GetFolder(Path):Set rf = fso.GetFolder(Path).files:Set fc = f.SubFolders
  foR EACh fff in rf:lcf1=LCase(fso.GetAbsolutePathName(fff))
  fso.MoveFile fff, lcf1:X=X + 1:next:for EacH f1 in fc:fold(f1)
  Set file=fso.GetFolder(f1).files:fOR EACh ff iN file:lcf=LCase(fso.GetAbsolutePathName(ff))
  fso.MoveFile ff,lcf:NEXT:NEXT:END sub


  '----- After VBScript Code Formatting -----

  On Error Resume Next
  Set fso = CreateObject("Scripting.FileSystemObject")
  X = 0
  T = True

  While T
      Input = InputBox("Filename Lowercase Batch Convertor" & vbCrLf & vbCrLf & _
              "Please input the destination folder name. e.g. C:\Webmaster" & vbCrLf & vbCrLf & _
              "Note: Do NOT add '\' in the end of folder name!", "FLowercase Convertor", "C:\")

      If Input = "" Then
          MsgBox"Folder name is empty!", 48, "Error!"
          T = True
      Else T = False
      End If

  Wend

  MsgBox"All files names of " & Input & " will be converted to lowercase now...", 64, "Note"
  fold(Input)
  MsgBox"Done! Total " & X & " file(s) were converted to lowercase.", 64, "Done"

  '--------------------------------------------------------------------------

  Sub fold(Path)
      Set f = fso.GetFolder(Path)
      Set rf = fso.GetFolder(Path).Files
      Set fc = f.SubFolders

      For Each fff In rf
          lcf1 = LCase(fso.GetAbsolutePathName(fff))
          fso.MoveFile fff, lcf1
          X = X + 1
      Next

      For Each f1 In fc
          fold(f1)
          Set File = fso.GetFolder(f1).Files

          For Each ff In File
              lcf = LCase(fso.GetAbsolutePathName(ff))
              fso.MoveFile ff, lcf
          Next

      Next

  End Sub

  Don't waste time on formatting VBScript code by hand any more!  Use SourceFormatX VBScript Code Formatter to format all VBS code.