change date formats in file name

A swapping-ground for Regular Expression syntax

change date formats in file name

Postby spacecabbie » Tue Dec 22, 2020 11:44 am

Hi and Hello,

I like to change a date format of Ymd(201201, to %d-%b-%Y(01-dec-2020)
file format i am working with is: 201201_DAY_TITLE_TOPIC
spacecabbie
 
Posts: 2
Joined: Tue Dec 22, 2020 11:34 am

Re: change date formats in file name

Postby Jack2 » Wed Dec 23, 2020 9:16 am

You could use this spreadsheet to make the text for an "Import Pairs" list that can be used in Bulk Rename Utility
http://s000.tinyupload.com/index.php?file_id=36294295953346357025

(if your files are in multiple folders, you've had to make a list for each folder).

---
in more detail:

0) Copy row 11 of the spreadsheet down the page for as many files/lines as you have

1) Get a list of your filenames (including the extensions) into a .TXT file using
a) windows command line (dir *.* /b /s /a:-D >Filelist.txt) (or similar, you might need to tweak the arguments);

b)or using apps like
https://www.karenware.com/powertools/karens-directory-printer
or
https://download.cnet.com/PrintFolders/3000-2248_4-10067127.html

.


2) Paste your list of filenames into Column A of the spreadsheet

3) column J will show the new filenames, as-per your format

4) column K will show the text needed by Bulk Rename Utility
copy-paste Column K into a new text document and save it somewhere as, say, NewPairs.txt .

5) go to BRU, use menu option Actions>Import Data Pairs, navigate to NewPairs.txt, and load it.

6) in BRU main UI window, navigate to the folder with your original files and Select all the files in the main window in BRU, and rename them in the usual way.
Jack2
 
Posts: 30
Joined: Wed Nov 14, 2018 4:32 pm

Re: change date formats in file name

Postby Admin » Wed Dec 23, 2020 2:04 pm

You can also export the file names into Excel from Bulk Rename Utility.
Select all the file names you need to export to Excel in Bulk Rename Utility, right-click, and from the menu select Clipboard Copy -> Filename + ext.
Paste in to Excel.
Admin
Site Admin
 
Posts: 2343
Joined: Tue Mar 08, 2005 8:39 pm

Re: change date formats in file name

Postby Luuk » Thu Dec 24, 2020 5:16 am

The RegEx(1) "v2" also might can do this, but its unfortunate because Im not understanding how to rename?
(201201,_DAY_Title_Topic -> %unknown-%unknown-%unknown(01-dec-2020)
Luuk
 
Posts: 690
Joined: Fri Feb 21, 2020 10:58 pm

Re: change date formats in file name

Postby spacecabbie » Thu Dec 24, 2020 7:37 am

thanks all it was resolved via the excel sheet.
spacecabbie
 
Posts: 2
Joined: Tue Dec 22, 2020 11:34 am


Return to Regular Expressions