|
|
|
|
|
|
|
![]() |
#1 |
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
|
OMFG!!!
OK, so I save the code* as greenguy_help.php then upload it to the server and then how do I run it? (I'm not tech savvy lol) Just go to it in a browser? "Execute" it via FTP? *Is there supposed to be a ?> at the end of the code? PS - If this works, Ramster will need your Paypal ![]() |
![]() |
![]() |
![]() |
#2 | |
Life is good
|
Quote:
Talk on Skype, if Skype actually updates you ![]() |
|
![]() |
![]() |
![]() |
#3 | |
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#4 | |
Me fail English? That's unpossible!
|
Quote:
It's optional. |
|
![]() |
![]() |
![]() |
#5 |
Certified Nice Person
|
I just tested it and works smoothly.
Vbulletin put two line breaks in when Howling pasted the code into the code thing. Note that the extension part is case sensitive. ------------------------------------------------------------------ <?php $path = "."; $extensions = array( "mp4" ); $files = array_diff(scandir($path), array('.', '..')); foreach ( $files as $file ) { if ( ! is_file ( $file ) ) continue; $file_parts = pathinfo( $file ); if ( ! in_array( $file_parts['extension'], $extensions ) ) continue; if ( ! file_exists( $file_parts['filename'] ) && ! mkdir( $file_parts['filename'] ) ) { echo "Oops! Could not create directory {$file_parts['filename']}\n"; continue; } $new_loc = $file_parts['filename'] . "/" . $file; if ( ! file_exists( $new_loc ) && ! rename( $file, $new_loc ) ) { echo "Oops! Could not move {$file} to {$new_loc}\n"; continue; } echo $file . " moved to {$new_loc} successfully.\n"; } ?> -----------------------
__________________
Click here to purchase a bridge I'm selling. |
![]() |
![]() |
![]() |
#6 | |
Certified Nice Person
|
If you're scared, change the "mp4" to "jpg" in a folder of test images on your server, then go to the address of this php file in your browser. It won't hurt anything.
Quote:
__________________
Click here to purchase a bridge I'm selling. |
|
![]() |
![]() |
![]() |
|
|