title: corresponding commands from batch file to vbsript
body: <p>I trying to go from cmd script to vbscript in MS window xp<br /></p>
  
  <p>cmd code yes works<br /></p>
  
  <pre><code>set home_=%~dp0
  
  set part001=part001
  set part002=part002
  set part003=part003
  set part004=part004
  
  ::get the dir in part001
  for /f "delims=" %%A in ('dir /s/b/o:n/a:d ^"%home%%part001%\^"') do (
  echo show have dir path
  echo %%A
  pause
  )
  echo to the end
  pause
  goto :eof
  </code></pre>
  
  <p>to vbscript  </p>
  
  <p>the part I do not know to convert are those that are foramtted as <b>cmd{cmd codeing}</b>  </p>
  
  <pre><code>dim strHome as strimg =cmd{[%~dp0]}
  
  dim strPart001 as sting = part001
  dim strPart002 as sting = part002
  dim strPart003 as sting = part003
  dim strPart004 as sting = part004
  
  'get the dir in part001
  Dim objFSo, objFile
  Set objFSo = CreateObject("Scripting.FileSystemObject")
  
  set objDirPart001list = objFS.getfolder(strHome&amp;strPart001\)
  set subDirPart001list = objDirPart001list.SubFolders
  for each  subDirPart001Name in subDirPart001list
      WScript.Echo show dir path
      WScript.Echo part
      cmd{pause}
      )
  cmd{pause}
  </code></pre>
  
  <p>what are the corresponding vbscript commands for:  </p>
  
  <ul>
  <li>%~dp0  </li>
  <li>pause</li>
  </ul>