Avatar of rgb192
rgb192
Flag for United States of America asked on

using php, I want to rename file '1' to 'email.txt'

many folders not recursive

folderA/1
folder45/1
folderHello/1
anotherFolder/1

files are named '1' with no extension name

I want to rename file '1' to 'email.txt'
PHP

Avatar of undefined
Last Comment
rgb192

8/22/2022 - Mon
SOLUTION
Marco Gasi

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER CERTIFIED SOLUTION
Ray Paseur

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Ray Paseur

@mankowitz: Yes, that is exactly what the script does, but it provides a generalized solution that does not need to be installed and run in every single directory you have on your server (some might have many directories).  Sometimes less is more and sometimes more is more. ;-)
rgb192

ASKER
I like Ray's script the best because it worked for my directories.
Your help has saved me hundreds of hours of internet surfing.
fblack61