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

    Help w FOR Loop in Batch File

    Thanks for pointing out what should have been obvious... It works now that I have spelled taskkill correctly.
  2. tobjob

    Help w FOR Loop in Batch File

    I am trying to take the PID output of the tasklist command and send it to the taskkill command. I have successfully createed a FOR loop to go through the values of the tasklist command and echo out the PID of the process. Mstsc.exe is used as just an example process to kill. for /F "tokens=2...
  3. tobjob

    FOR loop troubles

    I am trying to take the PID output of the tasklist command and send it to the taskkill command. I have successfully createed a FOR loop to go through the values of the tasklist command and echo out the PID of the process. Mstsc.exe is used as just an example process to kill. for /F "tokens=2...
  4. tobjob

    Testing for folder existance

    I wanted to let you know that you were right with the environmental variables. I assumed %systemroot% was the environmental variable, but it was %windir%. I swapped that out and defined the variable correctly. It works now just as it should. I thought %systemroot% is by default a environmental...
  5. tobjob

    Testing for folder existance

    I see what you mean about the variable not being defined correctly. But do you see anything indicating why it wouldn't work with the complete path "c:\windows\etc...." instead of using the variable?
  6. tobjob

    Testing for folder existance

    Definately should've turned off on error resume next. I have made the changes. However, I can't get the script to recognize that the folder exists. I have removed the strWinDir and just tested it with c:\windows\etc..., but that doesn't work either. Any suggestions why it isn't recognizing the...
  7. tobjob

    Testing for folder existance

    I made the addition you suggested, but aren't able to get the script to run successfully. I have also removed %systemroot% and put in c:\Windows...... but had no luck with that either. I have another script which you have commented on, about defragging a disk. It uses environmental variables...
  8. tobjob

    Testing for folder existance

    I have a script here to test for a folder's existence. If found pop up a message to show that it exists. In the long run it will run a command to uninstall the update if found. Right now I am trying to have it just locate the file and verify that is working, but I haven't had any luck. I have...
  9. tobjob

    VBS Script to read a file

    Thanks for the help. I am still having a bit of trouble with it. I used the inStr function and added the additional spaces at the end of the file. If I kept the Wscript.Echo in to pop up a message to say yes or no, it stayed in a constant loop saying "no" until I killed the wscript.exe. So I can...
  10. tobjob

    VBS Script to read a file

    I have a script that I have created to test a drive to see if it has to be defragged. I am able to run the defrag to analyze the disk without an issue. I would like to then read the text file output to see if the drive must be defragged. The file that is output contains the correct string I am...

Part and Inventory Search

Back
Top