473,386 Members | 1,736 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,386 software developers and data experts.

copy/move files..

While reading php.net I found

" bool copy ( string $source , string $dest [, resource $context ] )
Makes a copy of the file source to dest .
If you wish to move a file, use the rename() function. "

..... what? rename can move a file...?
Jan 7 '08 #1
4 3398
On Mon, 07 Jan 2008 17:22:02 +0100, jodleren <so*****@hot.eewrote:
While reading php.net I found

" bool copy ( string $source , string $dest [, resource $context ] )
Makes a copy of the file source to dest .
If you wish to move a file, use the rename() function. "

.... what? rename can move a file...?
Yes, with some caveats, quite common practice.
--
Rik Wasmus
Jan 7 '08 #2
.... what? rename can move a file...?

Never used DOS?
Jan 7 '08 #3
On Jan 7, 11:22 am, jodleren <sonn...@hot.eewrote:
While reading php.net I found

" bool copy ( string $source , string $dest [, resource $context ] )
Makes a copy of the file source to dest .
If you wish to move a file, use the rename() function. "

.... what? rename can move a file...?
Think of the entire folder path to the file as its name,
so if you have a file in folder /foo/bar/ named "Myfile" really how
the OS thinks of it is as a file named "/foo/bar/Myfile". if you
rename it to "/foo/BAZ/Myfile" it is now in the directory BAZ. its
"Name" for the OS has changed, even though its name for you, "Myfile"
hasn't. This is a gross oversimplification, but I think it should help
anyway.
Jan 7 '08 #4
jodleren wrote:
.... what? rename can move a file...?
Yeah. Welcome to the wonderful world of filesystem jargon.

--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

Un ordenador no es un televisor ni un microondas, es una herramienta
compleja.
Jan 7 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kay Lee | last post by:
Hi, I looked up os module to find out some method to move and copy files in python, but os doesn't support such methods. Is there any way to move & copy files in python? Thanks in adv.
3
by: Kay Lee | last post by:
Hi, I looked up os module to find out some method to move and copy files in python, but os doesn't support such methods. Is there any way to move & copy files in python? Thanks in adv.
5
by: Kevin | last post by:
Can anyone recommend the easiest way to get a full copy of a database from one server to another. The servers are not part of the same organization or network. I have received a backup of the...
4
by: oceanhai | last post by:
We currently have a PPTP connection set up for our developers to access our development SQL server through a VPN tunnel. When they need to copy tables up to the dev SQL from their local machine...
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...
2
by: Xavier Valdés | last post by:
Hi all, I would like to copy FILES from the clipboard to a desired folder from VB.NET. I was able to copy files (with filedrop data format) to the clipboard but I don't know how to catch this...
5
by: Saabster | last post by:
Hi all, It's always the simple stuff that trips you up I guess. Here is the issue I'm dealing with. I have a folder with 1400 excel files that I need to move to another location. Since each...
6
by: Fred | last post by:
I retreive files from the clipboard as below. Dim DObj As IDataObject = Clipboard.GetDataObject If DObj.GetDataPresent(DataFormats.FileDrop) Then Dim files As String() = _...
1
by: =?Utf-8?B?Y2FzaGRlc2ttYWM=?= | last post by:
Hi, I have seen many examples of moving a folder to a new location, but is there a way to simply copy it instead? For example, I want to copy the contents of folder C:\Testing\Stuff to...
4
by: Tom | last post by:
Every week our web guys publish the web site to all of our servers by logging into the server and doing a copy - paiste. We want to elminate the developers from logging into each server and doing...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.