473,320 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Copy a file to all sub-directories with PHP

walkingkeyboard
I am looking for a way to copy a PHP file to all directories under a specified directory. Any thoughts on what would be the best way to do this?
Mar 27 '07 #1
1 1653
ronverdonk
4,258 Expert 4TB
Yes. As follows:
Expand|Select|Wrap|Line Numbers
  1. -  read all files your current directory
  2. -  filter the subdirectories out and store in array
  3. -  for each entry in the array: 
  4.    - copy the file to each subdirectory
  5.  
Ronald :cool:
Mar 27 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: DraguVaso | last post by:
Hi, I'm looking for a way to Copy and Paste Files to the clipboard. I found a lot of articles to copy pieces of text and bitmaps etc, but nog whole files. Whay I need is like you have in...
7
by: lgbjr | last post by:
Hello All, I¡¯m using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard...
5
by: Hans Munich | last post by:
Szenario: User selects a XML File ("products.xml") to import newest Data. Data should replace Data in an existing Acess File which is connected via Dataadapter (daadaptFLR). Bevore the Existing...
12
by: samoore33 | last post by:
I found a real nice article on how to copy a directory on MSDN. The only problem is that I can not figure out how to get the namespace Microsoft.VisualBasic.MyServices. I wanted to know if anyone...
2
by: TwistedPair | last post by:
All, This is sort of a continuation of a previous post of mine. The code below basically reads a registry key to get a path to a folder and it watches for files created in that folder (only...
0
by: TwistedPair | last post by:
All, I had some great advice about this a bit ago, but I'm just not good enough with this code to put together all the pieces. The way the code below works is as a service. When it is started,...
4
by: TwistedPair | last post by:
All, Been trying to get a little program to work, and I think I'm really close, but I'm afraid I need to be pointed in the right direction. The code below will watch a directory for files...
4
by: taufik | last post by:
hi guys... i new person using vb.net i have some problem in copy a file into specific directory create by user... below is coding that write that may help u all to solve my problem Imports...
6
by: Michael | last post by:
I need to copy a huge file (around 300Mb) from a mapped network drive to another. I have created a console application and used System.IO.File.Copy function. But I want to know the process of...
1
by: veer | last post by:
hi it looks a silly question but i m getting confused actually i want to copy folders from one location to another like from C:\abc To D:\xyz here abc and xyz are two folders in c and d drive it...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.