Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Run this script with some changes.

Options
  • 02-06-2005 8:40pm
    #1
    Closed Accounts Posts: 20,346 ✭✭✭✭


    http://www.microsoft.com/technet/scriptcenter/resources/qanda/feb05/hey0223.mspx


    2 things i having trouble with

    1st i want to run that script but get an error using cscript "bad file name"

    I want it to change my files named "e:\files\pes4\log.txt log1 log2 log 3 and so forth (few thousand of them) So when i edit it and replace my dirs it doenst work.


    2nd is hader instead of the 1st 10 characters as the enw filename i want it to be the 16th to the 21st character that it changes to.


    Some help greatly appredciated.

    Thanks

    Kdjac


Comments

  • Registered Users Posts: 14,714 ✭✭✭✭Earthhorse


    This is using vbscript? I haven't done any vbscripts myself but understand it's pretty similar to VB.

    At the following link navigate to: Scripting Concepts and Technologies for System Administration > VBScript Primer > VBScript Reference > Working with Strings > Manipulating Strings and String Lengths

    http://www.microsoft.com/technet/scriptcenter/guide/default.mspx

    Around half way down you'll find info on the Right function which should get you at least half the answer to your 2nd question.

    For the first question have you tested whether it works for even one file? You'll need to be sure it does before writing a loop to cycle through all the files you want updated.


Advertisement