Greenguy's Board


Go Back   Greenguy's Board > General Business Knowledge
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2019-01-11, 07:23 AM   #1
Greenguy
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
 
Greenguy's Avatar
 
Join Date: Feb 2003
Location: Blasdell, NY (shithole suburb south of Buffalo)
Posts: 41,929
Send a message via ICQ to Greenguy
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
__________________

Promote POV Porn Cash By Building & Submitting Galleries to the Porn Luv Network
Greenguy is offline   Reply With Quote
Old 2019-01-11, 08:10 AM   #2
Ramster
Life is good
 
Ramster's Avatar
 
Join Date: Apr 2003
Location: Ottawa, Canada
Posts: 11,872
Send a message via ICQ to Ramster Send a message via AIM to Ramster
Quote:
Originally Posted by Greenguy View Post
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
I wouldn't run anything on my servers, or clients. I would just ask the hosting company, NationalNet to do this as they are paid to do it lol

Talk on Skype, if Skype actually updates you
__________________
Pornstar Legends | Live Cam Model Shows | Hungarian Girls
Skype: robmurray999
Ramster is offline   Reply With Quote
Old 2019-01-11, 08:29 AM   #3
Greenguy
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
 
Greenguy's Avatar
 
Join Date: Feb 2003
Location: Blasdell, NY (shithole suburb south of Buffalo)
Posts: 41,929
Send a message via ICQ to Greenguy
Quote:
Originally Posted by Ramster View Post
I wouldn't run anything on my servers, or clients. I would just ask the hosting company, NationalNet to do this as they are paid to do it lol
I'd run shit on your servers no problem
__________________

Promote POV Porn Cash By Building & Submitting Galleries to the Porn Luv Network
Greenguy is offline   Reply With Quote
Old 2019-01-11, 08:47 AM   #4
HowlingWulf
Me fail English? That's unpossible!
 
HowlingWulf's Avatar
 
Join Date: Dec 2003
Location: FL
Posts: 1,381
Send a message via ICQ to HowlingWulf
Quote:
Originally Posted by Greenguy View Post
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?
Upload it to the directory your MP4s are in. If you have shell access, run it from the command line. If not you can run it from your browser, though the output messages will be all on one line.

Quote:
Originally Posted by Greenguy View Post
*Is there supposed to be a ?> at the end of the code?
It's optional.
__________________
WordPress Porn directory theme => Maddos
Create a Porn Tube => Video Pornster
HowlingWulf is offline   Reply With Quote
Old 2019-01-11, 08:58 AM   #5
Useless
Certified Nice Person
 
Useless's Avatar
 
Join Date: Oct 2003
Location: Dirty Undies, NY
Posts: 11,268
Send a message via ICQ to Useless
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.
Useless is offline   Reply With Quote
Old 2019-01-11, 09:00 AM   #6
Useless
Certified Nice Person
 
Useless's Avatar
 
Join Date: Oct 2003
Location: Dirty Undies, NY
Posts: 11,268
Send a message via ICQ to Useless
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:
HCP032001.JPG moved to HCP032001/HCP032001.JPG successfully. HCP032002.JPG moved to HCP032002/HCP032002.JPG successfully. HCP032003.JPG moved to HCP032003/HCP032003.JPG successfully.
In that example, I changed the extension to "JPG" because it is case sensitive.
__________________
Click here to purchase a bridge I'm selling.
Useless is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:40 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc