All pastes #193078 Raw Edit

Mine

public text v1 · immutable
·published 2006-10-06 15:24 UTC
rendered paste body
OLD 

<job id="IncludeExample">
   <script language="VBScript">
      'Set path
      
      'Get Data Path
      'datapath="c:\work\adph\onwait\"
      'Get Data Path
      scriptpath="z:\tools\gawk\"
      'Check exec path
      
      'Check programs
      gawkexec="z:\tools\gawk\bin\gawk.exe"
      
      dim oShell,objFSO,objFile
      Dim fpath
      
      Set oShell = WScript.CreateObject ("WSCript.shell")
      
      reDim Preserve arrFile(WScript.Arguments.Length)
      Set objFSO = CreateObject("Scripting.FileSystemObject")
	If WScript.Arguments.Length <> 1 Then
	
		fpath = InputBox("Enter Full Path and Filename to use" & (Chr(13) & Chr(10)) &  _
		"Or Cancel to Exit")
		
		If objFSO.FileExists(fpath) Then 
			tname =  objFSO.GetBaseName(fpath)
			fname = objFSO.GetFileName(fpath)  
		Else
			Wscript.echo "File Not Found"
			Wscript.Quit(1)
		End If
	Else
 		tname =  objFSO.GetBaseName(WScript.Arguments(0))
		fname = objFSO.GetFileName(WScript.Arguments(0))
		fpath = objFSO.GetAbsolutePathName(WScript.Arguments(0))
	End If	
		
'	iret = InputBox("Using File: "& tname & (Chr(13) & Chr(10)) & _
'	"Enter field containing Seq" & (Chr(13) & Chr(10)) & _
'	"Or nothing to use Record Number")
	
	mret = Msgbox("Creating file: " & tname & ".8up" & (Chr(13) & Chr(10)) _
	& "OK to Continue or Cancel to Quit",vbOKCancel,"Confirm Actions")
	
	if mret = 1 then
		cret=oShell.Run("%comspec% /c "& gawkexec &" -f"& scriptpath & "8up.awk " & fpath )
	Else
		WScript.Quit(1)
	End If
	
	</script>
</job>


NEW


<job id="IncludeExample">
   <script language="VBScript">
      'Set path
      
      'Get Data Path
      'datapath="\\Data-serv\postalsoft\MAIL\OUTPUT"
      'Get Data Path
      scriptpath="\\Data-serv\postalsoft\TOOLS\gawk"
      'Check exec path
      
      'Check programs
      gawkexec="\\Data-serv\postalsoft\TOOLS\gawk\bin\gawk.exe"
      
      dim oShell,objFSO,objFile
      Dim fpath
      
      Set oShell = WScript.CreateObject ("WSCript.shell")
      
      reDim Preserve arrFile(WScript.Arguments.Length)
      Set objFSO = CreateObject("Scripting.FileSystemObject")
	If WScript.Arguments.Length <> 1 Then
	
		fpath = InputBox("Enter Full Path and Filename to use" & (Chr(13) & Chr(10)) &  _
		"Or Cancel to Exit")
		
		If objFSO.FileExists(fpath) Then 
			tname =  objFSO.GetBaseName(fpath)
			fname = objFSO.GetFileName(fpath)  
		Else
			Wscript.echo "File Not Found"
			Wscript.Quit(1)
		End If
	Else
 		tname =  objFSO.GetBaseName(WScript.Arguments(0))
		fname = objFSO.GetFileName(WScript.Arguments(0))
		fpath = objFSO.GetAbsolutePathName(WScript.Arguments(0))
	End If	
		
'	iret = InputBox("Using File: "& tname & (Chr(13) & Chr(10)) & _
'	"Enter field containing Seq" & (Chr(13) & Chr(10)) & _
'	"Or nothing to use Record Number")
	
	mret = Msgbox("Creating file: " & tname & ".8up" & (Chr(13) & Chr(10)) _
	& "OK to Continue or Cancel to Quit",vbOKCancel,"Confirm Actions")
	
	if mret = 1 then
		cret=oShell.Run("%comspec% /c "& gawkexec &" -f"& scriptpath & "8up.awk " & fpath )
	Else
		WScript.Quit(1)
	End If
	
	</script>
</job>