Nathan Nobbe wrote:
> On Jan 26, 2008 3:52 AM, Nathan Rixham <[EMAIL PROTECTED]> wrote:
>
>> vote 2 for:
>> mv dir1/* dir2
>
>
> its nice, but its platform dependent.
Which surely is not that much of a drawback? (well, the OP didn't
mention it anyway).
/Per Jessen, Zürich
--
PHP General M
On Jan 26, 2008 3:52 AM, Nathan Rixham <[EMAIL PROTECTED]> wrote:
> vote 2 for:
> mv dir1/* dir2
its nice, but its platform dependent.
-nathan
vote 2 for:
mv dir1/* dir2
:) backticks!
Per Jessen wrote:
Pastor Steve wrote:
I have been looking, but the problem is that I don¹t know what
questions to ask or what to look for. I think it is a rename function.
That works, but it only does one file at a time. I was looking for
something tha
Pastor Steve wrote:
> I have been looking, but the problem is that I don¹t know what
> questions to ask or what to look for. I think it is a rename function.
> That works, but it only does one file at a time. I was looking for
> something that will do all the files in the directory without needing
On Thu, 2008-01-24 at 18:05 -0500, Al wrote:
> You obviously missed my last sentence. "Once you get this working, you can
> put
> the rename() in the first foreach() loop. Don't forget to take care of
> exceptions. "
Yep, sorry :)
Cheers,
Rob.
--
...
You obviously missed my last sentence. "Once you get this working, you can put
the rename() in the first foreach() loop. Don't forget to take care of
exceptions. "
Robert Cummings wrote:
On Thu, 2008-01-24 at 16:18 -0500, Al wrote:
First get an array of all the files, e.g.,
That's useful
On Jan 24, 2008 4:42 PM, Bastien Koert <[EMAIL PROTECTED]> wrote:
> http://ca3.php.net/manual/en/function.copy.php
>
> make the manual your friend
rename() is much more efficient; since the original files will
have to be deleted as well, with a copy approach.
and i suspect rename() atomic as wel
http://ca3.php.net/manual/en/function.copy.php
make the manual your friend
bastien> Date: Thu, 24 Jan 2008 14:36:55 -0600> From: [EMAIL PROTECTED]> To:
php-general@lists.php.net> Subject: [PHP] Rename> > Does anyone know if there
is a way to move all the files in one direc
On Thu, 2008-01-24 at 16:18 -0500, Al wrote:
> First get an array of all the files, e.g.,
That's useful for debugging, but once you know what you're doing, it's a
waste of resources to accumulate the array unless you have a good reason
for doing so :)
Cheers,
Rob.
--
...
y, January 24, 2008 02:36:55 PM -0600
From: Pastor Steve <[EMAIL PROTECTED]>
To: PHP eMail List
Subject: [PHP] Rename
Does anyone know if there is a way to move all the files in one
directory into another?
Thanks,
--
Steve M.
-- End Original Message --
--
PHP Gen
here a simple little cli script that has the guts of what youre
trying to accomplish.
NOTE: this is not a comprehensive solution :)
-nathan
On Jan 24, 2008 3:51 PM, Pastor Steve <[EMAIL PROTECTED]> wrote:
> I have been looking, but the problem is that I don¹t know what questions
> to
> ask or what to look for. I think it is a rename function. That works, but
> it
> only does one file at a time. I was looking for something that will do
/>
>
>
>- Rick
>
>
> Original Message
>> > Date: Thursday, January 24, 2008 02:36:55 PM -0600
>> > From: Pastor Steve <[EMAIL PROTECTED]>
>> > To: PHP eMail List
>> > Subject: [PHP] Rename
>> &g
Does anyone know if there is a way to move all the files in one directory
into another?
Thanks,
--
Steve M.
Both versions are PHP 5.2.4_p20070914-r2
I backchecked the rights a couple of times. There to problem
does not appear.
I cant really understand what is happening. On the server
eaccelerator and memcache is performing its work. I believe
that when I restart the apache and as well the memcache all
On Friday 19 October 2007 12:49:50 Sascha Braun | CEO @ BRAUN Networks wrote:
> Hi everyone,
>
> I am using the rename function on my local development
> system fine. But as soon as I upload the script, the
> rename function does not work anymore.
>
> Is there a specific compiler flag needed, to ma
Sascha Braun | CEO @ BRAUN Networks wrote:
I am using the rename function on my local development
system fine. But as soon as I upload the script, the
rename function does not work anymore.
Is there a specific compiler flag needed, to make rename
work on both plattforms?
You're using different
Hi everyone,
I am using the rename function on my local development
system fine. But as soon as I upload the script, the
rename function does not work anymore.
Is there a specific compiler flag needed, to make rename
work on both plattforms?
Thank you very much.
Sascha
--
PHP General Mailing
On 10 August 2005 22:19, Richard Lynch wrote:
> You can also, in some versions, "get away" with having \
> inside of "" so
> long as the following character isn't special:
> $string = "C:\homedirectory\uploadedfiles\\newfile.gif";
>
> Note that the 'n' character is special (newline) but 'h' and '
On Tue, August 9, 2005 6:16 am, Stut wrote:
> Colons (:) are not allowed in Windows filenames.
Of course they aren't allowed in file NAMES -- Because they are an
integral part of a drive letter designation such as "C:" which is what is
being used here.
There's nothing wrong with the C: part of t
Bosky, Dave wrote:
I seem to be having some trouble renaming a file after uploading it.
It always returns a warning message indicating I have an invalid
attribute in my rename statement.
$old = 'C:\\homedirectory\uploadedfiles\\newfile.gif';
$new = 'C:\\homedirectory\\uploadedfiles\\2005-08-
I seem to be having some trouble renaming a file after uploading it.
It always returns a warning message indicating I have an invalid
attribute in my rename statement.
Thanks,
Dave
---
Example:
$old = 'C:\\homedirectory\uploadedfiles\\newfile.gif';
$new = 'C:\\homedi
On Sat, June 18, 2005 3:50 am, Mister Jack said:
> I would like to know precisely what rename do in case of error. any
> link for that ?
It will probably return 0 (or maybe -1) on error.
It may or may not also fill in $php_errmessage (?) or whatever the
variable is called.
It should be documente
Hi,
I would like to know precisely what rename do in case of error. any
link for that ?
I do a : @rename($old, $new), what happens if I run out of space ? is
the rename just an alias for C function library ?
thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://ww
Can this be done when the file already exists?
cleong at organic dot com says
29-Mar-2000 04:36
rename() doesn't seem to overwrite files on NT. The behavior is an
OS-dependent side-effect I guess.
on the PHP site @ http://us2.php.net/manual/en/function.rename.php
So this this true, or is there
Lowell Allen wrote
So, I think you need to pass rename parameters that are file locations.
HTH
--
Lowell Allen
Thank you!!!
I was not in tune to what was happening. You are correct. You must
pass file locations and not just file namesonce I passed the
locations, the warning went away
> Lowell Allen wrote:
>
>>
>> Try using $HTTP_POST_FILES['uploadedFile']['name'] instead. I wasted a bunch
>> of time yesterday with an upload script that did not recognize files when
>> using "$_FILES", but worked fine with "$HTTP_POST_FILES" -- PHP 4.3.4 on
>> Linux.
>>
> Thank you for the sug
Lowell Allen wrote:
Try using $HTTP_POST_FILES['uploadedFile']['name'] instead. I wasted a bunch
of time yesterday with an upload script that did not recognize files when
using "$_FILES", but worked fine with "$HTTP_POST_FILES" -- PHP 4.3.4 on
Linux.
Thank you for the suggestion. Unfortunately, i
> I have this magical script which uses rename. A visitor to the site
> uploads a file and I want to rename it to a timestamp. Oddly enough,
> the rename() function actually works, it renames the file AND then
> generates a level 2 warning:
>
> Error code: 2
> Error message: rename() failed (No
Hello,
I have this magical script which uses rename. A visitor to the site
uploads a file and I want to rename it to a timestamp. Oddly enough,
the rename() function actually works, it renames the file AND then
generates a level 2 warning:
Error code: 2
Error message: rename() failed (No suc
Thanks for your response,
What I tried was the following:
header("Content-type: text/plain");
header("Content-Disposition: attachment; filename=\"textfile.txt\"");
echo $output;
This works properly on Mozilla, however the following problems occur in IE:
IE version 5.50.4522.1800 -> 2 dialog boxe
From: "Grant Rutherford" <[EMAIL PROTECTED]>
> I have tried many variations of the header command, but no luck so far.
> It seems to work okay on Mozilla browsers but not IE.
Okay, what have you actually tried? What are you using now? Have you read
through _all_ of the comments on the manual page
Grant Rutherford wrote:
Alternatively, is there some way that I could generate that file,
redirect the user to it, and then delete the file again afterwards? I
know how to do all of this except delete the file. Is there some way to
schedule a command to be run after the script is finished?
T
Hi there,
I would like a user to request the page "view_file.php", and I would
like php to generate an arbitrary file and send it to the user. This is
all okay, however, I would like to rename the sent page so that the
browser doesn't open it in a window as an html file but instead brings
up
Global works...
- Original Message -
From: "Jennifer Goodie" <[EMAIL PROTECTED]>
To: "Boyd Pearson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, September 24, 2003 3:44 PM
Subject: RE: [PHP] rename variables
> > I'm trying
> I'm trying to rename some variables.
>
> first I have a function -
> randomize (3,4); //has created unique $numbers
>
> then I want to create a function for the renaming:
>
> renameit($sculp); //sends $sculp for the new variable name
>
> and this function (and variations)
>
> function renameit($v
I'm trying to rename some variables.
first I have a function -
randomize (3,4); //has created unique $numbers
then I want to create a function for the renaming:
renameit($sculp); //sends $sculp for the new variable name
and this function (and variations)
function renameit($var){
$z = 1;
foreach
lto:[EMAIL PROTECTED]
Sent: Thursday, September 11, 2003 3:19 PM
To: Edward Peloke; [EMAIL PROTECTED] Php. Net
Subject: Re: [PHP] rename()
From: "Edward Peloke" <[EMAIL PROTECTED]>
> This is probably an easy question
Yep.. ;)
> I have an uploaded image in a temp file
From: "Edward Peloke" <[EMAIL PROTECTED]>
> This is probably an easy question
Yep.. ;)
> I have an uploaded image in a temp file that I want to rename and put in
> another folder. I am using rename() which works fine, the problem is, I
> want to force an overwrite if the file already exists. [
This is probably an easy question but I have been looking at this code for a
while and it is all blurry..:)
I have an uploaded image in a temp file that I want to rename and put in
another folder. I am using rename() which works fine, the problem is, I
want to force an overwrite if the file alrea
At 09:52 31.01.2003, =?ISO-2022-JP?B?GyRCJVghPCVzGyhCIBskQiVIITwlXiU5GyhC?=
said:
[snip]
>when i try to rename a file with single quote(s) in the
>file name, e.g.
>
>rename("/tmp/foo 'n bar", "/tmp/foobar");
>
>rename fails with "there is no such file".
>what
On Friday 31 January 2003 16:52, $B%X!<%s(B $B%H!<%^%9(B wrote:
(B> when i try to rename a file with single quote(s) in the
(B> file name, e.g.
(B>
(B> rename("/tmp/foo 'n bar", "/tmp/foobar");
(B>
(B> rename fails with "there is no such file".
(B> whats wrong?
(B
(BYou probably need t
when i try to rename a file with single quote(s) in the
(Bfile name, e.g.
(B
(Brename("/tmp/foo 'n bar", "/tmp/foobar");
(B
(Brename fails with "there is no such file".
(Bwhats wrong?
(B
(Bthanx,
(B
(Bakagisan
(B
(B__
(BDo You Yahoo!?
(B
On Wednesday 11 December 2002 18:55, Steve Jackson wrote:
> > On Wednesday 11 December 2002 17:30, Steve Jackson wrote:
> > > I'm trying to rename an uploaded file with the value of a select I
> > > have in the uploaded form. Can someone point me in the right
> > > direction. The PHP.net rename man
> On Wednesday 11 December 2002 17:30, Steve Jackson wrote:
> > I'm trying to rename an uploaded file with the value of a select I
> > have in the uploaded form. Can someone point me in the right
> > direction. The PHP.net rename manual isn't helping a lot? My code:
>
> What is the problem?
>
On Wednesday 11 December 2002 17:30, Steve Jackson wrote:
> I'm trying to rename an uploaded file with the value of a select I have
> in the uploaded form. Can someone point me in the right direction. The
> PHP.net rename manual isn't helping a lot? My code:
What is the problem?
> //eshop_upload
I'm trying to rename an uploaded file with the value of a select I have
in the uploaded form. Can someone point me in the right direction. The
PHP.net rename manual isn't helping a lot? My code:
//Form for upload
Select the category to add the picture
to:
Please select...
{$array["catname"]}"
> I am trying to allow the user to upload pictures. What is the best
way to
> rename them? If I use the rename function, I have to upload the
pictures
> to
> the same place as the script and then move it. ALso, if I am not sure
of
> the extension, how can I simply rename it? Can I do multiple f
estination's file extension using
$_FILES['userfile']['type'] or $_FILES['userfile']['name'] using php
function like eregi() for example-
- Original Message -
From: "Edward Peloke" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
I am trying to allow the user to upload pictures. What is the best way to
rename them? If I use the rename function, I have to upload the pictures to
the same place as the script and then move it. ALso, if I am not sure of
the extension, how can I simply rename it? Can I do multiple files at on
make sure that YOUR security and the
security of your server come before all other considerations.
Best regards,
Bill
-Original Message-
From: Martin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 09, 2001 7:20 AM
To: [EMAIL PROTECTED]
Subject: [PHP] rename problem...
Hi!
When i'm
Hi!
When i'm trying to run this script:
I get this error:
Warning: Rename failed (Permission denied) in
C:\Inetpub\WEBS\mysko\uploads\rename.php on line 4
The directoy has change permissions. What am i donig wrong...?
/martin
--
PHP General Mailing List (http://www.php.net/)
To unsubscrib
e -
> From: "Jeff" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 24, 2001 6:07 PM
> Subject: [PHP] rename a directory
>
> > Does anyone know how to rename a directory? There is rename() for files
> > but I couldn't find any
Yes, rename() does work on Windows as well as on *nix.
-Original Message-
From: Tom Carter [mailto:[EMAIL PROTECTED]]
Sent: 24 July 2001 17:54
To: [EMAIL PROTECTED]; Jeff
Subject: Re: [PHP] rename a directory
on unix I think it should work for both.. can't say I know on windows..
on unix I think it should work for both.. can't say I know on windows..
also, why not try exec or system and just run the normal system command for
it?
- Original Message -
From: "Jeff" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 24, 2001 6:
Does anyone know how to rename a directory? There is rename() for files
but I couldn't find anything for directories...
Thanks,
Jeff
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the li
http://php.net/rename
> -Original Message-
> From: Randy Johnson [mailto:[EMAIL PROTECTED]]
> Sent: 13 iulie 2001 20:53
> To: Randy Johnson; Chris Lambert - WhiteCrown Networks;
> [EMAIL PROTECTED]
> Subject: [PHP] Rename a File?
>
>
> How do I re
mv filename newfilename
- Original Message -
From: "Randy Johnson" <[EMAIL PROTECTED]>
To: "Randy Johnson" <[EMAIL PROTECTED]>; "Chris Lambert - WhiteCrown
Networks" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, July 13, 20
How do I rename a file on Linux in PHP?
Thanks
Randy
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
I think you can rename it by using a full path. Have you tried it yet?
Cheers,
Maxim Maletsky
-Original Message-
From: Miguel Loureiro [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 12:02 AM
To: php-gen
Subject: [PHP] rename?
Hi ,
having a hierarchy of directories
Hi ,
having a hierarchy of directories, like A\b\d, A\c, I would like to move directory
A\b\d to A\c\d , to (try) to get it I test something like rename(d,".. / c/d"), but I
get " Warning: Rename failed (No such file or directory) in ", it's necessary create
the directory first, I mean , Mkdir
61 matches
Mail list logo