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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Run this script with some changes.

  • 02-06-2005 7: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, Registered Users 2 Posts: 14,716 ✭✭✭✭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