mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-30 07:04:17 +00:00
Moved remotely
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@47 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
af43554c83
commit
05262112cb
21 files changed
No files matched your search
@@ -0,0 +1,12 @@
|
||||
Set WshShell = WScript.CreateObject("WScript.Shell")
|
||||
Set objArgs = WScript.Arguments
|
||||
|
||||
'system, user, or process
|
||||
wscript.echo Showpath(objargs(0))
|
||||
|
||||
Function Showpath(folderspec)
|
||||
Dim fso, f
|
||||
Set fso = CreateObject("Scripting.FileSystemObject")
|
||||
Set f = fso.GetFolder(folderspec)
|
||||
showpath = f.path
|
||||
End Function
|
||||
@@ -0,0 +1,20 @@
|
||||
Const OpenAsASCII = 0 ' Opens the file as ASCII (TristateFalse)
|
||||
Const OpenAsUnicode = -1 ' Opens the file as Unicode (TristateTrue)
|
||||
Const OpenAsDefault = -2 ' Opens the file using the system default
|
||||
|
||||
Const OverwriteIfExist = -1
|
||||
Const FailIfNotExist = 0
|
||||
Const ForReading = 1
|
||||
Set objArgs = WScript.Arguments
|
||||
|
||||
' path to original log file
|
||||
sFileName = objargs(0)
|
||||
|
||||
Set oFSO = CreateObject("Scripting.FileSystemObject")
|
||||
Set fOrgFile = oFSO.OpenTextFile(sFileName, ForReading, FailIfNotExist, OpenAsASCII)
|
||||
sText = fOrgFile.ReadAll
|
||||
fOrgFile.Close
|
||||
sText = Replace(sText, vbLf, vbCrLf)
|
||||
Set fNewFile = oFSO.CreateTextFile(sFileName, OverwriteIfExist, OpenAsASCII)
|
||||
fNewFile.WriteLine sText
|
||||
fNewFile.Close
|
||||
@@ -0,0 +1,28 @@
|
||||
Set vcProj = CreateObject("VisualStudio.VCProjectEngine.7.1")
|
||||
Set objFile = Createobject("Scripting.FileSystemObject")
|
||||
Set objArgs = WScript.Arguments
|
||||
|
||||
'// check the arguments to be sure it's right
|
||||
if (objArgs.Count() < 2) Then
|
||||
WScript.Echo("VC6 or 5 DSP Project File Conversion")
|
||||
WScript.Echo("Opens specified .dsp and converts to VC7.1 Format.")
|
||||
WScript.Echo("Will create project file with .vcproj extension")
|
||||
WScript.Echo("usage: <full path\project.dsp> <full path\project.vcproj>")
|
||||
WScript.Quit(1)
|
||||
End If
|
||||
WScript.Echo("Converting: "+ objArgs.Item(0))
|
||||
'// If there is a file name of the .vcproj extension, do not convert
|
||||
Set vcProject = vcProj.LoadProject(objArgs.Item(0))
|
||||
If Not objFile.FileExists(vcProject.ProjectFile) Then
|
||||
' // specify name and location of new project file
|
||||
vcProject.ProjectFile = objArgs.Item(1)
|
||||
|
||||
' // call the project engine to save this off.
|
||||
' // when no name is shown, it will create one with the .vcproj name
|
||||
vcProject.Save()
|
||||
WScript.Echo("New Project Name: "+vcProject.ProjectFile+"")
|
||||
|
||||
else
|
||||
|
||||
WScript.Echo("ERROR!: "+vcProject.ProjectFile+" already exists!")
|
||||
End If
|
||||
@@ -0,0 +1,28 @@
|
||||
Set vcProj = CreateObject("VisualStudio.VCProjectEngine.8.0")
|
||||
Set objFile = Createobject("Scripting.FileSystemObject")
|
||||
Set objArgs = WScript.Arguments
|
||||
|
||||
'// check the arguments to be sure it's right
|
||||
if (objArgs.Count() < 2) Then
|
||||
WScript.Echo("VC6 or 5 DSP Project File Conversion")
|
||||
WScript.Echo("Opens specified .dsp and converts to VC7.1 Format.")
|
||||
WScript.Echo("Will create project file with .vcproj extension")
|
||||
WScript.Echo("usage: <full path\project.dsp> <full path\project.vcproj>")
|
||||
WScript.Quit(1)
|
||||
End If
|
||||
WScript.Echo("Converting: "+ objArgs.Item(0))
|
||||
'// If there is a file name of the .vcproj extension, do not convert
|
||||
Set vcProject = vcProj.LoadProject(objArgs.Item(0))
|
||||
If Not objFile.FileExists(vcProject.ProjectFile) Then
|
||||
' // specify name and location of new project file
|
||||
vcProject.ProjectFile = objArgs.Item(1)
|
||||
|
||||
' // call the project engine to save this off.
|
||||
' // when no name is shown, it will create one with the .vcproj name
|
||||
vcProject.Save()
|
||||
WScript.Echo("New Project Name: "+vcProject.ProjectFile+"")
|
||||
|
||||
else
|
||||
|
||||
WScript.Echo("ERROR!: "+vcProject.ProjectFile+" already exists!")
|
||||
End If
|
||||
@@ -0,0 +1,47 @@
|
||||
Set WshShell = WScript.CreateObject("WScript.Shell")
|
||||
Set objArgs = WScript.Arguments
|
||||
|
||||
StartPos = InstrRev(objargs(0), "/", -1, 1)
|
||||
strlength = Len(objargs(0))
|
||||
|
||||
If objArgs.Count > 1 Then
|
||||
Path= Showpath(objargs(1))
|
||||
Else
|
||||
Path= Showpath(".")
|
||||
End If
|
||||
Wget objargs(0), Path & "\", Right(objargs(0),strlength-StartPos)
|
||||
|
||||
|
||||
Sub Wget(URL, DestFolder, Imagefile)
|
||||
|
||||
Set xml = CreateObject("Microsoft.XMLHTTP")
|
||||
xml.Open "GET", URL, False
|
||||
xml.Send
|
||||
|
||||
set oStream = createobject("Adodb.Stream")
|
||||
Const adTypeBinary = 1
|
||||
Const adSaveCreateOverWrite = 2
|
||||
Const adSaveCreateNotExist = 1
|
||||
|
||||
oStream.type = adTypeBinary
|
||||
oStream.open
|
||||
oStream.write xml.responseBody
|
||||
|
||||
' Do not overwrite an existing file
|
||||
oStream.savetofile DestFolder & ImageFile, adSaveCreateNotExist
|
||||
|
||||
' Use this form to overwrite a file if it already exists
|
||||
' oStream.savetofile DestFolder & ImageFile, adSaveCreateOverWrite
|
||||
|
||||
oStream.close
|
||||
|
||||
set oStream = nothing
|
||||
Set xml = Nothing
|
||||
End Sub
|
||||
|
||||
Function Showpath(folderspec)
|
||||
Dim fso, f
|
||||
Set fso = CreateObject("Scripting.FileSystemObject")
|
||||
Set f = fso.GetFolder(folderspec)
|
||||
showpath = f.path
|
||||
End Function
|
||||
Reference in new issue
Block a user