jperri
asked on
Help rename filename
I'm trying to rename SF0310271145.CSV (SFyymmddhhmm.csv) to SISCR12mmddhhmm.csv in command prompt using 'rename' but it truncates the filename.
Here's what I enter at the prompt...
ren SF03*.CSV SISCR12*.CSV
The result is...
SISCR1271145.CSV
I tried this in NT4.0 and XP Pro with the same results. Is there a undocumented switch for 'rename'. I need to create a batch script that can do this for me automatically. Please help. TIA.
Here's what I enter at the prompt...
ren SF03*.CSV SISCR12*.CSV
The result is...
SISCR1271145.CSV
I tried this in NT4.0 and XP Pro with the same results. Is there a undocumented switch for 'rename'. I need to create a batch script that can do this for me automatically. Please help. TIA.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@echo off
set filename=SF0310271145.CSV
ren %filename% SISCR12%filename:~4%
Good Luck,
Steve