Is this possible? Let me know If I need specify further on what I am trying to do- I just want to spare you the boring details of my personal file management.
Thanks in advance-
Brian- (2 Replies)
hi all.
Please help me with archiving previous day syslog files.
the files have no extension and have the format YYYY-MM-DD.
I want to archive the file then move it to some other machine.
thanks. (2 Replies)
Hi
I am Trying to Write a script that can goto 4 different directorys on the server & remove the Files older then 30 days ??
/logs
logs1 logs2 logs3
Now I need to remove files under
logs1 logs2 logs3 which are older then 30 days whose name stat 'sit' , 'mig','bld' .
in... (3 Replies)
hi all,
here is the description to my problem.
input parameter: $date1
based on the date i need to select three files starting with audit.log* based on its modified date, a date before, a date after(if its exists). We need to compare the input date to modified date of the file. And then... (3 Replies)
Hi Team,
I have over 1 lakh pdf files.
I want to create folders like Disk-1, Disk-2 ..... & want to move 3000 pdfs per folder. Can i do it by script? Please help me.
Thanks & Regards
Parag Nehete (4 Replies)
Hi All,
Am new to both Unix & this Forum - Need some help on a script that I am trying to write:
In a Directory i have few text files which might or might not contain some text that I am trying to find.
Once that text is found in any of the files, it needs to be removed from the file
... (6 Replies)
Hi All,
I have a large amount of files that I need to copy from one server to another server using SFTP. Can comeone please help me with the command I would use here?
Here is what I am thinking, but being new at this I know this is probably wrong:
Login to the destination host using... (1 Reply)
Hi all,
i have a folder, with tons of files containing as following,
on /my/folder/jobs/
some_name_2016-01-17-22-38-58_some name_0_0.zip.done
some_name_2016-01-17-22-40-30_some name_0_0.zip.done
some_name_2016-01-17-22-48-50_some name_0_0.zip.done
and these can be lots of similar files,... (6 Replies)
Hi All,
Daily i am doing the house keeping in one of my server and manually moving the files which were older than 90 days and moving to destination folder.
using the find command . Could you please assist me how to put the automation using the shell script .
... (11 Replies)
I've got this script to loop through all folders and move files that are more than 2 years old. I'm using the install command because it creates the necessary directories on the destination path and then I remove the source. I'd like to change the script to use the mv command since it is much... (4 Replies)
Discussion started by: consultant
4 Replies
LEARN ABOUT PHP
copy
COPY(3) 1 COPY(3)copy - Copies fileSYNOPSIS
bool copy (string $source, string $dest, [resource $context])
DESCRIPTION
Makes a copy of the file $source to $dest.
If you wish to move a file, use the rename(3) function.
PARAMETERS
o $source
- Path to the source file.
o $dest
- The destination path. If $dest is a URL, the copy operation may fail if the wrapper does not support overwriting of existing
files.
Warning
If the destination file already exists, it will be overwritten.
o $context
- A valid context resource created with stream_context_create(3).
RETURN VALUES
Returns TRUE on success or FALSE on failure.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.4 | |
| | |
| | Changed the $context parameter to actually have |
| | an effect. Previously, any $context was ignored. |
| | |
| 5.3.0 | |
| | |
| | Added context support. |
| | |
| 4.3.0 | |
| | |
| | Both $source and $dest may now be URLs if the |
| | "fopen wrappers" have been enabled. See fopen(3) |
| | for more details. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
copy(3) example
<?php
$file = 'example.txt';
$newfile = 'example.txt.bak';
if (!copy($file, $newfile)) {
echo "failed to copy $file...
";
}
?>
SEE ALSO move_uploaded_file(3), rename(3), The section of the manual about handling file uploads.
PHP Documentation Group COPY(3)