Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. captedgar

    Eliminate spaces

    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...
  2. captedgar

    OpenTextFile Issue

    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...
  3. captedgar

    OpenTextFile Issue

    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.
  4. captedgar

    Assembly Registry

    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...
  5. captedgar

    OpenTextFile Issue

    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...
  6. captedgar

    JScript Split Method

    Thanks Vacunita and Feherke.
  7. captedgar

    objNetwork query

    Thanks vacunita you are extremely helpful.
  8. captedgar

    objNetwork query

    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...
  9. captedgar

    objNetwork query

    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...
  10. captedgar

    objNetwork query

    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) {...
  11. captedgar

    JScript Split Method

    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
  12. captedgar

    passing arguments

    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...
  13. captedgar

    passing arguments

    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')...
  14. captedgar

    read array from a text file

    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...
  15. captedgar

    finding files

    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...
  16. captedgar

    read array from a text file

    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")...
  17. captedgar

    finding files

    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...
  18. captedgar

    finding files

    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...
  19. captedgar

    read array from a text file

    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 =...
  20. captedgar

    finding files

    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...

Part and Inventory Search

Back
Top