GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Anyone Have A Program That Will Do This? (https://gfy.com/showthread.php?t=871199)

Bama 11-24-2008 04:34 AM

Anyone Have A Program That Will Do This?
 
I have 30 php files that I need to copy into 300 different folders (all under 1 root folder).

Is there a windows dos command that will do this or windows program? I can't seem to find one.

Machete_ 11-24-2008 05:04 AM

1 - Get robocopy from Windows® Server 2003 Resource Kit Tools
http://www.microsoft.com/downloads/d...displaylang=en
Install and find the file Robocopy.exe and put it in a folder you can find through DOS

2 - Export your list of dirs to a excel doc - place them in column B

3 - write: robocopy c:\sourcedir\ in column A

4 - in ColumC insert: /E /R:1 /W:5 /NC /LOG:log.txt

5 - now you will have 3 columns
robocopy c:\sourcedir\ "listofdirs" /E /R:1 /W:5 /NC /LOG:log.txt

6 - Copy the lines in A and B down all the way in all the list

7 - Select all and copy

8 - open notepad and paste it in

9 - save it as copy.bat in the same dir as the robocopy file

10 - navigate to the dir in DOS and run the copy.bat file

11 - If you have questions, type robocopy /? in the dos prompt when you are located in the dir - it will give you a list of syntaxes.

Or check google for the list, its there as well

Machete_ 11-24-2008 05:04 AM

it will produce a logfile called log.txt - you can see if it misses something and the rest of the progress

Bama 11-24-2008 06:20 AM

That makes my head spin! Isn't there an easier way?

munki 11-24-2008 06:22 AM

Bitch, Ctrl + C, Moan, Ctrl + V, Complain...

Rinse Wash Repeat...

munki 11-24-2008 06:26 AM

On a more serious notice, If you have them loaded to your server and you have ssh I can help ya knock that out with a few commands...

Machete_ 11-24-2008 06:30 AM

Quote:

Originally Posted by Bama (Post 15097626)
That makes my head spin! Isn't there an easier way?

:) you can do it - you are a smart guy


Alternatively you can google; Recursion copy

AnalProbe 11-24-2008 06:31 AM

Create a textfile and give each foldername its own line.

In BSD or Linux, go to the folder that contains the 30 scripts, copy with the "cp" command, use an asterisk for all files in the folder or *.php to select all php files and "copy to" the directories in the textfile you created.

Just type "man cp" for details.

And learn how to use regular expressions.

Good Luck.

RedShoe 11-24-2008 06:39 AM

Quote:

Originally Posted by munki (Post 15097628)
Bitch, Ctrl + C, Moan, Ctrl + V, Complain...

Rinse Wash Repeat...

From the time he posted this until when you posted in here. He'd have been finished using your method.

The one thing I've learned over the years: you'll generally spend more time and effort searching for and executing a new shortcut.

The Heron 11-24-2008 06:58 AM

Quote:

Originally Posted by RedShoe (Post 15097665)
From the time he posted this until when you posted in here. He'd have been finished using your method.

The one thing I've learned over the years: you'll generally spend more time and effort searching for and executing a new shortcut.

Don't forget that the shortcut usually doesn't work right and fucksup so your bloodpressure goes crazy...

- Jesus Christ - 11-24-2008 07:00 AM

Well since your dealing with php... write a php script to read every dir, maybe using scandir() which creates an array... then create a loop to copy the files to each location in the array.

I'm not a programmer but if you really want to call yourself a webmaster you need to pickup the basics of at least 1 programming language for situations like this.

Quote:

Originally Posted by Bama (Post 15097626)
That makes my head spin! Isn't there an easier way?

"Bullet For My Valentine - No Easy Way Out.mp3"

quantum-x 11-24-2008 08:04 AM

Quote:

Originally Posted by - Jesus Christ - (Post 15097717)
Well since your dealing with php... write a php script to read every dir, maybe using scandir() which creates an array... then create a loop to copy the files to each location in the array.

I'm not a programmer but if you really want to call yourself a webmaster you need to pickup the basics of at least 1 programming language for situations like this.


"Bullet For My Valentine - No Easy Way Out.mp3"

glob :2 cents:

gornyhuy 11-24-2008 08:16 AM

http://us3.php.net/copy

Bama 12-02-2008 11:36 PM

I found it and it works like a charm

Copy the files (CTRL+C) and then select the folders you want to paste into and in they go!

http://www.theutilityfactory.com/

Last nite I pasted 28 files into 350 different folders by hand. My wrist was so sore I couldn't jerk off - and we just can't have that!

PersianKitty 12-03-2008 12:21 AM

Quote:

Originally Posted by munki (Post 15097628)
Bitch, Ctrl + C, Moan, Ctrl + V, Complain...

Rinse Wash Repeat...

LoL.. that's what his been doing..

you forgot the whine though

Bama 12-03-2008 03:44 AM

Quote:

Originally Posted by PersianKitty (Post 15135696)
LoL.. that's what his been doing..
you forgot the whine though

It benefits you too tho - I won't have to borrow your wrist now! :-)

StaceyJo 12-03-2008 03:48 AM

You can do it Bama. Good luck.

munki 12-03-2008 04:09 AM

Quote:

Originally Posted by Bama (Post 15136034)
It benefits you too tho - I won't have to borrow your wrist now! :-)

:1orglaugh:1orglaugh

pornbling 12-03-2008 04:26 AM

With a bat file with some commands you can do it, I've done this b4 if you need help message me.

Bama 12-03-2008 05:09 AM

Take a look at this and you'll see just why having that program helped!

This is for 1 site.........

http://www.bamas.com/stats.jpg


All times are GMT -7. The time now is 07:52 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc