vbscript

SFTP transfer file and move file to folder

Hi all, This is my first post so please excuse my ignorance. I am using a vbscript to zip all .csv type files in a particular folder. After some google searches, I have found a workable vbscript to do this and have enabled a scheduled task to automate this. What I need to do next is to transfer the zip file via sftp and then "move" tha...

DOM + need to remove element from XML bt VB script

I have the following VB script , I want to remove the "NET2 ID" element from name list how to remove the NET2 ID element , need first to verify if NET2 defined and then to delete it THX Set objXMLDoc = CreateObject("Microsoft.XMLDOM") objXMLDoc.async = False objXMLDoc.load("\\dir\d.xml") Set objRoot = objXMLDoc.documentElement Set ...

Is the IIsFtpService WMI class supported for IIS7 compatibility mode?

I heard a rumour that the IIsFtpService WMI class is not supported when using IIS7 (with IIS6 WMI compatability). However, I cannot find this on Microsoft's website. I need to write support for both IIS6 and IIS7. I have tried and failed to use the class with no success, but IIsWebService works just fine. ...

Ping script with loop and save in a txt

Hello, i try to make an Ping script with vbs. I need a Script, that ping (no ping limit, the program will run all the time) a computername in the network every 2 seconds and save the results in a txt file. For Example: 06/08/2010 - 13:53:22 | The Computer "..." is online 06/08/2010 - 13:53:24 | The Computer "..." is offline Now i tr...

VBScript Regular Expressions to check IP address validity with some adtional characters

How to create VB script Irregular expression syntax to check the VPparam (IP address validity) When the last octatat of the IP address is a range between ip's (x-y) and between each IP we can put the "," separator in order to add another IP example of VBparam VBparam=172.17.202.1-20 VBparam=172.17.202.1-10,192.9.200.1-100 VBparam=172...

VBScript - copy files modified in last 24 hours

Hi, I'm trying to copy files from a directory where the last modified date is within 24hours of the current date. I'm using a wildcard in the filepath as it changes every day I'm using; option explicit dim fileSystem, folder, file dim path path = "d:\x\logs" Set fileSystem = CreateObject("Scripting.FileSystemObject") Set folder = fi...

Opening a New Window in a New Session with Javascript in Internet Explorer 8

Hi We are migrating at work to Internet Explorer 8 and we are confronted to the new "feature" the so called "Session Merging", all new windows from IE8 share the same Session Cookie. That's creating some problems because we have a Web based system that must permit work in parallel in several windows, but each must have it's own Sessio...

VBScript Permission Denied on CopyFile

I'm running a VBScript in SQL Agent but I get a 'Permission Denied' on line 34 (the first copy attempt). I've run this script outside SQL Agent with no problems FYI: The 'X:\' drive is mapped to a SharePoint folder. This may be the culprit. Function Main() Const SourceDrive As String = "X:\" Dim fso Dim Today Dim FileName Dim FromFil...

How to retrieve all errors and messages from a query using ADO

When a SQL batch returns more than one message from e.g. print statements, then I can only retrieve the first one using the ADO connection's Errors collection. How do I get the rest of the messages? If I run this script: Option Explicit Dim conn Set conn = CreateObject("ADODB.Connection") conn.Provider = "SQLOLEDB" conn.ConnectionStrin...

For...Next Loop Multiplication Table to Start on 0

I have my For...Next loop with a multiplication table working just fine, but I want the top left box to start at 0 and move on from there. Giving me some trouble. dim mult mult = "<table width = ""100%"" border= ""1"" >" For row = 1 to 50 mult = mult & "<tr align = ""center"" >" For col= 1 to 20 mult = mult & "<td>"...

How to break from loop by the cancel button in inputbox

The following VB script check the valid IP by Test function if we get OK from the test function then We break from loop ValidIP=OK If not the inputBox ask the question until ValidIP=OK But sometimes I want to exit from loop by cancel button How to break loop by the cancel button (in order to set the ValidIP as OK) Do Until ValidIP=O...

clone dictionary object in vbscript

Hi I have a dictionary object in vbscript how can i copy (duplicate) the object in to new dictionary......some thing like i want to clone an existing dictionary object..... thanks in advance ...

ASP error 424 Object required

I've got a problem with the following code pasted below, the problem seems to be coming from the openastextstream this carries on from another question: Set str_text_stream = obj_file.OpenAsTextStream(ForReading, TristateUseDefault) response.Write "<table>" int_j = 0 int_x = 0 Err.number = 0 Do While Not str_text_stream.AtEndOfStream ...

use vbscript to get 32 bit floating point into binary byte or word representation

Hello, I don't know how to do two somewhat related task within vbscript (not vb) -I need to break a 32 bit floating point into it's 4 byte binary representation. -I need to break a 32 bit floating point into it's 2 word(aka16bit) binary representation. For example, 65535.0 in format binary is 1000111011111111111111100000000 65535.0 in ...

run vb script from other script

Hi I have for example two VB script: Test1.vb Test2.vb How to run Test2.vb from Test1.vb Test2.vb location : C:\Program Files ...

Is vbscripting that difficult?

I need to write some vbscripts in my new project. I was told by other people that vbscripting is easy, but seems to me, it is not. For example, in the following example (provided by microsoft), these functions: CreateObject, CreateShortcut, as well as these property names: TargetPath, WindowStyle, Hotkey, etc, are used, but I just cannot...

wait for the second VB script untill ended from primary VB script

Hi I have VB script that run second VB script The second VB script ask some questions from the input box My problem is that “MyShell.Run” not wait until SecondVBscript.vbs will ended And the Other VB syntax run immodestly also Need to wait for MyShell.Run process ended and then perform the Other VB syntax How can I do that? Set MyShe...

How to Verify if file exist with VB script

ho to verify by VB script syntax if the file conf C:\Program Files\conf exist under Program Files ? for example if it exist then msgBox print file exist if not the msgBox print file not exist THX ...

if then endif , other smart solution in place of if then ....

I have the following VB script How to write this VB script with case syntax? In order to perform professional writing in place if then…. yael Set fso = CreateObject("Scripting.FileSystemObject") If (fso.FileExists("C:\file1 ")) Then Verification=ok Else WScript.Echo("file1") Wscript.Quit(100) End If If (fso.FileExists("C...

VBScript Regular Expressions to check IP address validity with some adtional characters

How to create VB script Irregular expression syntax to check the VPparam (IP address validity) When the last octatat of the IP address is a range between ip's (x-y) and between each IP we can put the "," separator in order to add another IP example of VBparam VBparam=172.17.202.1-20 VBparam=172.17.202.1-10,192.9.200.1-100 VBparam=172...