Headlines
stream.lha - utility/benchmark
Apr 27, 2024
thumbnailmaker.lha - video/misc
Apr 26, 2024
mce.lha - game/utility
Apr 23, 2024
theme_list.lha - utility/misc
Apr 23, 2024
faac.lha - audio/convert
Apr 22, 2024
faad2.lha - audio/convert
Apr 22, 2024
seq.lha - audio/misc
Apr 22, 2024
libfaac.lha - development/library/audio
Apr 22, 2024
libfaad.lha - development/library/audio
Apr 22, 2024
image2pdf.lha - utility/text/convert
Apr 22, 2024
Topic options
View mode
Newest First
Rename script request
Posted on:
2021/5/15 16:24
#1
Just popping in
Joined: 2015/9/29 0:42Last Login
: 2/25 18:04
From Bettendorf, IA, USA
Group:
Registered Users
Hi, guys! Long time no chat. I am looking for some help. I need a script to rename 600+ files. The filename has the date in it, I want to change the format. mark_ritter_31072020_1628_xxxx_yyy.jpg I want to change JUST the date format to: mark_ritter_2020-07-31_1628_xxxx_yyy.jpg leaving the rest of the filename the same. The date is in the same position for every filename. I would like an ARexx or DOS script. Put it in the drawer. Execute it. It scans in all the names and renames them. Thanks!!!
Re: Rename script request
Posted on:
2021/5/15 17:21
#2
Not too shy to talk
Joined: 2007/1/10 21:56Last Login
: Yesterday 23:34
From Stockholm Sweden
Group:
Registered Users
I wanted to do the same thing back in 2010 on A1XE with lots of photos and I succeded in doing so, but can I can't remeber exactly what i did.. Have some memory of making a Directory Opus script.. But can't find it on my X5000..
1989-> A500, A600, A3000, A4000, A1200, CD32, µA1, PegII, A1XE, CDTV, Amy/416D79, A1X5000, Vampire 500 V2+, Vampire 600 V2, Amy-ITX, Denise ITX <-2024
Re: Rename script request
Posted on:
2021/5/15 17:58
#3
Home away from home
Joined: 2006/11/26 21:45Last Login
: Today 14:26
From a dying planet
Group:
Registered Users
@mritter0
Tested on a two file list, haven't had the will to create more files
*NOT* optimized!
/* */
ADDRESS COMMAND 'list mark#? lformat="%n" >filelist.txt'
OPEN ( fl , 'filelist.txt' , 'R' )
DO WHILE ~ EOF ( fl )
fn = READLN ( fl )
/*
Catch empty lines and skip them
*/
IF fn ~= ' ' THEN DO
fn_date = SUBSTR ( fn , 13 , 8 )
fn_date_day = SUBSTR ( fn_date , 1 , 2 )
fn_date_month = SUBSTR ( fn_date , 3 , 2 )
fn_date_year = SUBSTR ( fn_date , 5 , 4 )
fn_date = fn_date_year '-' fn_date_month '-' fn_date_day
fn_new = INSERT ( '..' , fn , 13 , 2 )
fn_new = OVERLAY ( fn_date , fn_new , 13 )
ADDRESS COMMAND 'rename ' fn ' as ' fn_new
END
END
CLOSE ( fl )
ADDRESS COMMAND 'delete filelist.txt'
EXIT 0
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg
Re: Rename script request
Posted on:
2021/5/15 19:08
#4
Just popping in
Joined: 2015/9/29 0:42Last Login
: 2/25 18:04
From Bettendorf, IA, USA
Group:
Registered Users
@Raziel Thank you! Worked perfectly! Appreciate it!
Re: Rename script request
Posted on:
2021/5/15 22:09
#5
Home away from home
Joined: 2006/11/26 21:45Last Login
: Today 14:26
From a dying planet
Group:
Registered Users
@mritter0 yw, was fun to knock it together quickly
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg
Re: Rename script request
Posted on:
2021/5/15 22:45
#6
Site Builder
Joined: 2006/12/2 23:57Last Login
: Yesterday 21:11
From Athens/Dublin
Group:
Staff members Webmasters
Currently Active Users Viewing This Thread:
1
(
0 members
and 1 Anonymous Users
)