title: Check if a folder exist and rename in vbscript
body: <p>Okay here is what I want to do. My script copies a folder too the appdata folder on the computer but here is what I need it to do. I need it to check if a folder of that name already exists and if it does to rename it to something else then copy the folder here is my current script that I need to modify to check if the folder excists. Thanx In advance</p>
  
  <pre><code>Set oShell = CreateObject("WScript.Shell")
  strHomeFolder = oShell.ExpandEnvironmentStrings("%APPDATA%")
  
  
  Set oShell = CreateObject("WScript.Shell")
  Set ofso = CreateObject("Scripting.FileSystemObject")
  oShell.CurrentDirectory = oFSO.GetParentFolderName(Wscript.ScriptFullName)
  
  DestinationFolder = strHomeFolder &amp; "\vlc"
  SourceFolder = oShell.CurrentDirectory &amp; "\vlc"
  
  dim filesys 
  set filesys=CreateObject("Scripting.FileSystemObject") 
  If filesys.FolderExists(SourceFolder ) Then 
  filesys.CopyFolder SourceFolder , DestinationFolder 
  End If
  </code></pre>