Trouble moving directory
| From: | -k. | Date: | Thu, 13 Oct 2005 02:11:45 +0000 |
| Subject: | Trouble moving directory | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-224004@lists.php.net to get a copy of this message | ||
I'm having trouble moving some directories. My script works fine on some directories but
doesn't
move others. It seems to have trouble with directories with non alphanumeric charters. I'm
running
Red Hat FC2. I'm trying to move the directory basically like this...
<?Php
$source_dir = '/some/dir/Dir That Won't Move/';
$dest_dir = '/some/other/dir/'
$cmd = escapeshellcmd("mv ".$source_dir." ".$dest_dir);
$result = shell_exec($cmd);
?>
Is there some way to escape the characters in the directories? For example if i put a "\"
in front
of blank spaces it takes care of those (same for "'","(" etc.) but that
obviously doesn't take
care of everything. I'm hoping there is something easy i'm overlooking here that will
escape all
the characters.
-k.
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com