0
C:\Users\xxxx\Downloads\CarepointServiceR2_CarepointServiceR2_**109**_artifacts  

The Number which is highlighted is dynamically changed each and every day. I have to rename this like CarePointServiceR2.

I Use this:

ren C:\Users\xxxx\Downloads\CarepointServiceR2_CarepointServiceR2_???_artifacts CarePointServicesR2

It was not working. Please help me to get out of this.

1
  • Can you define what you mean by not working? Is it throwing an error, renaming the wrong thing, not renaming? Crashing?
    – Dave
    Commented Jan 24, 2014 at 12:16

1 Answer 1

1

The * is also a wild card

The following should help (assuming that since the name changes each day that it is the only file in the folder - if there are multiple files with different numbers, this won't work).

ren C:\Users\xxxx\Downloads\CarepointServiceR2_CarepointServiceR2_*_artifacts CarePointServicesR2

More reading about wild cards

2
  • 1
    In theory, his original ??? should have worked too.
    – Bob
    Commented Jan 24, 2014 at 12:03
  • 1
    @Bob, yes, I agree, although possibly dangerous when (if) that numbers hits NNNN characters (such as 1000)
    – Dave
    Commented Jan 24, 2014 at 12:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .