Help with renaming 3 different files.

Post any Bulk Rename Utility support requirements here. Open to all registered users.

Help with renaming 3 different files.

Postby Don » Wed Nov 06, 2013 10:10 pm

On a daily basis I need to rename 3 different files. I need to include a date and a specific extension. I have figured out the date part but not the extension. I want to write a commandline that I can schedule for daily processing. Any help is appreciated. When I get the files, they have no extension
Before
sal_adj
sal_act
sal_trd_osi

After
sal_adj_yyyymmdd.saj
sal_act_yyyymmdd.saa
sal_trd_osi_yyyymmdd.sat
Don
 
Posts: 3
Joined: Wed Nov 06, 2013 10:01 pm

Suffixing .extension AFTER Date

Postby truth » Thu Nov 07, 2013 1:52 am

What _DateType is being suffixed?
What logic determines those .extensions?
Do OrigFilenames never have .extensions?
truth
 
Posts: 221
Joined: Tue Jun 25, 2013 3:39 am
Location: Earth, OrionArm, MilkyWay

Re: Help with renaming 3 different files.

Postby Don » Thu Nov 07, 2013 3:39 pm

The _DateType is Now.
The command I am using to add the date is
/APPENDDATE:N:s:_::10:%Y%m%d
The files will never have the extensions, I need to add them. The extensions will be bthe same each day. the file sal.adj will get a .saj extension. The file sal_act will get a .saa extionsion and the file sal_trd_osi will get a .sat extension
Thanks for your help.
Don
 
Posts: 3
Joined: Wed Nov 06, 2013 10:01 pm

Suffixing .extension AFTER Date

Postby truth » Fri Nov 08, 2013 2:07 am

OK, filename determines 1 of 3 possible .ext's - no worries
Should these 3-possible .ext's change from 1day to the next?
Do the 3-files reside alone within the same Dir (no other files)?

For now, I'd play it safe with a 3-line batch:
brc32 /pattern:sal_adj /AppendDate:N:s:_::10:%%Y%%m%%d /Suffix:.saj
brc32 /pattern:sal_act /AppendDate:N:s:_::10:%%Y%%m%%d /Suffix:.saa
brc32 /pattern:sal_trd_osi /AppendDate:N:s:_::10:%%Y%%m%%d /Suffix:.sat

Just add /execute, /nofolders, & whatever else you may need (/IgnoreFileX unnecessary)
truth
 
Posts: 221
Joined: Tue Jun 25, 2013 3:39 am
Location: Earth, OrionArm, MilkyWay

Re: Help with renaming 3 different files.

Postby Don » Fri Nov 08, 2013 6:50 pm

The file extensions will not change from 1 day to the next and there is 1 other file in the folder. The batch you suggested worked great.
Thanks again.
Don
 
Posts: 3
Joined: Wed Nov 06, 2013 10:01 pm

Re: Help with renaming 3 different files.

Postby thinMichael » Sat Nov 16, 2013 11:30 am

That's helpful to me :)
thinMichael
 
Posts: 2
Joined: Sat Nov 16, 2013 11:26 am


Return to BRU Support