Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Renaming file using batch script

Featured Replies

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


Here's an example of variable expansion, (see SET /?), which should help you out!

@Echo off&Setlocal
Set "_=09302008092212AM.pdf"
Set "_=%_:~4,4%%_:~0,4%%_:~8%"
Echo:%_%&Pause

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.