Hi there
I'm trying to eliminate spaces when creating a folder through my scripts.
One of the section has a line called
Name=WScript.stdin.ReadLine().replace(/ +/,'');
which pass "Name" value to another function to create a folder and name it accordingly.
For some reason when i had the...
Hi davism
One of the values strDir =
'\\\\IP Address Of Server\\g$\\Folder1\\SubFolder1\\2009_12_24_11_50_15_307_radCEEF.tmp'
is a temp file which gets created during my the execution of the scripts and actually gets deleted before the end of the script.
So in essence
var...
Hi Guys
Where do i have to insert quotes?
strDir variable = \\IP Address Of Server\g$\Folder1\SubFolder1\2009_12_24_11_50_15_307_radCEEF.tmp
So when OpenTextFile method calls this variable during the execution of the script, then i get a message on the cmd prompt saying File not found.
Hi there
One Section of my script is as follows
if(!strDestFile.search(/.*\.dll$/))
{
if(!strSourceFolder.endsWith("Folder1"))
{
UnregisterVBAssembly(strDestFile);
}
else
{
UnRegisterDotNetAssembly(strDestFile);
}
}
How do i go about editing the above section so that when both .Net and VB...
Hi there
One of the lines of my code is as follows
var objTestFile=x.OpenTextFile(strDir, ForReading,false);
What this does is opens a temp file within a shared folder and performs the required task.
For some strange reason, if i include a space in the name of the shared folder. For ex: "Test...
I know most of the logic my main questions are as follows
1. for(i = 1; i < x.length; i += 2) = how this will evaluate when u only have 1 mapped drive called V Drive. Will it read V Drive or will it read strRoot = \\server1\\share1
2. if(strRoot.toUpperCase()==x.Item(i).toUpperCase())
How...
Thanks for the reply.
The following is the function i have and the following are the parameters passed to it
strRoot = \\server1\\share1
bUserName = name of the user(passed as a string value) ex: captedgar
There is only 1 mapped drive to the PC which is V Drive.
Can u now explain the logic...
Hi there
I have one mapped network drive to my PC at home. i call it the V Drive
i came across a Jscript which had the following line when
EnumNetworkDrives Method was initiated
var x = objNetwork.EnumNetworkDrives();
for(i = 1; i < x.length; i += 2)
{...
Hi there
I'm trying to figure out what the following syntax for split means in the following line of the code
arrTest[0].split('/')[0]
what does ('/')[0] means in split('/')[0]?
please can anyone explain
Thanks for the reply Greg
The problem is this creates a log folder as follows
2010-01-05-B-undefined-T-undefined-undefined
The script doesn't prompt or ask me for entering B which is Build ID or T which is transaction ID or does it ask for entering the issue description
When i run that file...
Hi there
I need help passing extra arguments to one of the function in my script.
The code below is one of the functionality of the script and it creates Log Folder
function CreateNewLogSubDir()
{ var strSubdirName='';
strSubdirName=WScript.Arguments.Named.Item'New')...
Hi tektipGuyInWhistler
Thanks for the reviewing the code. As i'm a newbie and also looking at your code which uses winmgts, where can i input the file extension to search i.e if i were to search a file ext called .TOP where i can i feed this into the script which is what i was trying to program...
Hi daniel
Thanks for answering the reply
for the first question, i meant where can i call this text file in your script. I already have a text file called servers.txt which has about 90 odd server names in it. where i can call this server.txt file in your above script. i would imagine this to...
Hi mr movie
I have the following script
'Script to search the file path on multiple servers and write to a log.'
Set objFSO = CreateObject("Scripting.FileSystemObject")
strTmpName = "Report.log"
Set objScript = objFSO.CreateTextFile(strTmpName)
arrComputers = ReadTxtToArray("Servers.txt")...
Sorry Daniel
I did not intend to put my name on it. This is just a sample script which i was provided to me by another developer. I just put my name so that whoever checks it knows these scripts are the ones they need to provide help/guidance to. if it helps i'll take off the author name as...
Hi Daniel
Thanks first of all for being helpful and writing a script for me. Now i have 2 script one of yours and my own which i managed to write upto. before i start i re-iterate i'm a complete newbie and you may find me asking some silly questions.
In the above script of yours, where i can...
Hi there
I need guidance or help please on the following script.
See below only a segment code which i need guidance for
Set objFSO = CreateObject("Scripting.FileSystemObject")
strTmpName = "Report.log"
Set objScript = objFSO.CreateTextFile(strTmpName)
arrComputers =...
Hi there
I'm a newbie to programming but very much willing to work hard and try. We have about 100 servers and on each servers we have the g drive and e drive. early this year there were some temp files dumped all over the 100 servers under variuos folders and subfolders so i have been assigned...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.