Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
111 user(s) are online (59 user(s) are browsing Forums)

Members: 0
Guests: 111

more...

Headlines

 
  Register To Post  

Rename script request
Just popping in
Just popping in


See User information
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!!!

Go to top
Re: Rename script request
Not too shy to talk
Not too shy to talk


See User information
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
Go to top
Re: Rename script request
Home away from home
Home away from home


See User information
@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
Go to top
Re: Rename script request
Just popping in
Just popping in


See User information
@Raziel

Thank you! Worked perfectly! Appreciate it!

Go to top
Re: Rename script request
Home away from home
Home away from home


See User information
@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
Go to top
Re: Rename script request
Site Builder
Site Builder


See User information
Have you guys tried MultiRen?

https://www.onyxsoft.se/multiren.html

Follow me on
Ko-fi, Twitter, YouTube, Twitch
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project