Page 1 of 1 1
Topic Options
#212263 - 2017-02-04 05:11 AM Shorten File Names
xjvs001 Offline
Just in Town

Registered: 2017-02-04
Posts: 1
Loc: Florida
I'm looking to bulk rename files with a shorter name.
I'd like to replace the first six characters with four new ones

Example Ren 45_9_1*.* 0900*.*

If I use a batch file I end up with 0900_1

Thank you in advance for any help!

Top
#212264 - 2017-02-04 06:44 AM Re: Shorten File Names [Re: xjvs001]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4562
Loc: USA
Something like this maybe...

 Code:
for each $file in dirplus(@scriptdir)
  $newfilename="0900" + right($file.name,-6)
  ? $newfilename
next


You will need dirplus to make this work...

Dirplus -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=82153

How to use UDFs -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=81943#Post81943

The rest of the UDFs are here -
http://www.kixtart.org/forums/ubbthreads.php?ubb=postlist&Board=7&page=1

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 601 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.134 seconds in which 0.096 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org