![]() |
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. |
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 |
it will produce a logfile called log.txt - you can see if it misses something and the rest of the progress
|
That makes my head spin! Isn't there an easier way?
|
Bitch, Ctrl + C, Moan, Ctrl + V, Complain...
Rinse Wash Repeat... |
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...
|
Quote:
Alternatively you can google; Recursion copy |
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. |
Quote:
The one thing I've learned over the years: you'll generally spend more time and effort searching for and executing a new shortcut. |
Quote:
|
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:
|
Quote:
|
|
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! |
Quote:
you forgot the whine though |
Quote:
|
You can do it Bama. Good luck.
|
Quote:
|
With a bat file with some commands you can do it, I've done this b4 if you need help message me.
|
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