Jump to content

Renaming files in a folder and make a list


etrader

Recommended Posts

Untested, un-proof-read, but try...

foreach (glob("1/files/*.mp4") as $filename) {
$filename1 = str_replace(" ", "_", $filename);
$old_full = "1/files/" . $filename;
$new_full = "1/files/" . $filename1'
rename ($old_full, $new_full);
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.