Jump to content

Renaming file using batch script


Recommended Posts

Hi, I want to make a batch script which takes a file name which comes in this format:

MonthDayYearHoursMinutesSecondsAM/PM.pdf

and renames it to

YearMonthDayHoursMinutesSecondsAM/PM.pdf

For example:

09302008092212AM.pdf -> 20080930092212AM.pdf

I am hoping I can use the for command to do this somehow. Maybe someone can tell me if I can use "2 characters" as a delimeter, that way I could split it into 09 30 20 08 09 22 12 AM .p df and rearrange.

Any help would be highly appreciated,

Thanks

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...