Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Change content of variable.  (Read 3898 times)

0 Members and 1 Guest are viewing this topic.

Woodman

    Topic Starter


    Beginner
    Change content of variable.
    « on: June 11, 2009, 08:47:29 PM »
    Win XP (H) Cmd.exe Batch script.

    In a For loop is it possible to change the content of %%A by removing the first character only without using the Set command.

    e.g.
    Code: [Select]
    Set var=%%A
    ren %%A !var:~1!

    will correctly rename the filename in %%A but is there a command which will remove the first char of %%A so that the code could be:

    Code: [Select]
    ren %%A !%%A:~1!or something like that???

    gh0std0g74



      Apprentice

      Thanked: 37
      Re: Change content of variable.
      « Reply #1 on: June 11, 2009, 08:54:24 PM »
      what do you want to do actually?

      Woodman

        Topic Starter


        Beginner
        Re: Change content of variable.
        « Reply #2 on: June 12, 2009, 03:29:31 AM »
        At present, nothing.  Just querying if its possible to change the content of an %%A type variable in the same, or similar, manner to that of an %A% type variable.