rename() fails in C:/Documents and Settings/ directories



This may be more of a Windows issue, so if there's a better place to ask this, please advise.
But I figure that someone may have already dealt with this issue here. In fact, _I_ have dealt
with this issue some years ago, somehow, but for the life of me, I can't remember how I did
it!

I'm writing a script to automate the management of some program settings in C:\Documents
and Settings\xxx\Application Data\yyy. The script needs to manipulate files in that directory:
move out some files and move in others. Well, the problem is that I can move out anything I
want, but using rename() I can't move in anything. The error is reported as "No such file or
directory," which doesn't make sense.

It seems that the Documents and Settings directory tree is treated differently by the system.
All directories there are marked as read-only in Explorer, and the setting cannot be removed.
However, files within the directories are not necessarily read-only (the ones I am trying to
manipulate aren't). No other programs seem to have any trouble with these directories, but
Perl is defeated by them.

What can I do here?
.



Relevant Pages

  • Re: rename() fails in C:/Documents and Settings/ directories
    ... script needs to manipulate files in that directory: ...
    (comp.lang.perl.misc)
  • Re: New Microsoft Anti-Spyware Tool
    ... > registry concept is an example of this. ... is it any different to keep various program settings, user settings, etc. in ... I would grant you that it makes moving program settings a little harder ... DECADE now to keep data files in 'My Documents,' and there's been a great ...
    (sci.electronics.design)
  • Re: Transfer everything BUT THE OS to another hard drive
    ... The only 100% successful/sure way to get your files/folders/applications ... their original installation media with their original serial numbers/product ... Outlook settings and some other program settings will not, ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: Registry keys for my application
    ... INI is fine for single users and for overall program settings that aren't ...
    (microsoft.public.vb.general.discussion)
  • Re: Registry keys for my application
    ... INI is fine for single users and for overall program settings that aren't ...
    (microsoft.public.vb.enterprise)