Help with filename change

A swapping-ground for Regular Expression syntax

Help with filename change

Postby nwcooper2004 » Tue Mar 15, 2016 1:34 am

I have thousands of file with the following format AK-Greely_Subdivision-20160325.csv. AK is the State, Greely_Subdivision is the county and 20160325 is the date. How would I change all files to just be
County-Greely_Subdivision-Auction_Date-03_25_2016.csv? I would like to remove the first three characters from all filenames.

Thanks in advance!
nwcooper2004
 
Posts: 4
Joined: Tue Mar 15, 2016 1:26 am

Re: Help with filename change

Postby Admin » Tue Mar 15, 2016 2:37 am

Hi, can you give a few examples of from file name and to file name? thanks
Admin
Site Admin
 
Posts: 1521
Joined: Tue Mar 08, 2005 8:39 pm

Re: Help with filename change

Postby nwcooper2004 » Tue Mar 15, 2016 6:53 pm

I have thousands of files in the following format where the first two letters of filename are abbreviations of a State, the next letters are the County and the numbers are the date. Basically I want to replace the State abbreviation with County, leave the rest of the characters the same and if possible put the date in a different format in front of the filename. so for example the following filenames would change from:

AK-Greely_Subdivision-20160325.csv
CA-Alameda-20160318.csv
TX-Anderson-20160405.csv
FL-Miami-dade-20160310.csv

to:

03_25_2016-County-Greely_Subdivision.csv
03_18_2016-County-Alameda.csv
04_05_2016-County-Anderson.csv
04_05_2016-County-Miami-dade.csv

Thanks in advance. I will definitely make a donation for the help!

Neil
nwcooper2004
 
Posts: 4
Joined: Tue Mar 15, 2016 1:26 am

Re: Help with filename change

Postby Admin » Wed Mar 16, 2016 12:29 am

Thanks, you can do this with 2 passes using Regular Expressions or in 1 pass using Javascript.
Javascript requires a commercial license (which you might need anyway if you are using BRU in a commercial environment). See:
http://www.bulkrenameutility.co.uk/Buy.php

Which one do you want to use?
thanks
Admin
Site Admin
 
Posts: 1521
Joined: Tue Mar 08, 2005 8:39 pm


Return to Regular Expressions