Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File Backup problem

Status
Not open for further replies.

Sunnmann

Technical User
Oct 11, 2003
10
US
A while back I received some help on a perl script that used srvinfo.exe to grab information from PC's. Well that script has now grown to do ALOT more. Including using the output frmo first part and parsing out certain data, then using this new output to see which servers do not have certain hotfixes. I am loving it and want to give Raklet a huge sloppy kiss.

Now I am having an issues trying to beter organize the outputs, as I am doing many different kinds of computers and do not want them ALL in one huge text file.

My problem is that when I try to backup a file about 2 folders from the perl script, it keeps telling me tat permission is denied.

here is the line:

print "Backing up old twssrvinfo.txt... \n";
rename ("\txtfiles\TWS\twssrvinfo.txt", "\txtfiles\TWS\bac\twssrvinfo.bac") || die "Cannot rename twssrvinfo.txt: $!";



Now I have made all the folders, on MY personal computer where I am admin, so that ANYONE and EVERYONE, and USERS, and THE KITCHEN SINK, all have complete and total access to this folder, no holds bar, the big cheese, like if they were superman.

Still I get this error. Is there another wa to write this? Do I have the syntax wrong? I have looked around again and could not find any satisfying information, and the PERL guru here at work is gone till the beginning of next year :(.

Thank you guys in advance for your help.
 
Ummm, I found out part of my problem is that I am not escaping the \ with another one. So far the line I showed has worked with that. I will test on the whole script when i finish chaging it.
 
Sunnman,

Use the / character instead of \ and Perl will do the right thing without you having to \
Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

It's like this; even samurai have teddy bears, and even teddy bears get drunk.
 
>> I am loving it and want to give Raklet a huge sloppy kiss.

Thanks, I'm flattered. :) If there is anything else I can do to help, let me know.
 
:) <sigh>

raklet gets *all* the kisses....

Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

It's like this; even samurai have teddy bears, and even teddy bears get drunk.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top