Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
open files so TS doesn't think it's modified.
Bowker
TS 5.5.2 sp2
win2k
I would like to read through all the content in a workarea BUT I don't want the files to be marked as modified in TS.
Anyone have a way to do this?
Find more posts tagged with
Comments
JonathonG
I assume you mean from a script? or do you mean as a user?
From a script, files don't get marked as modified unless you write to them. So, something like this in Perl should work:
open TEST, "testjg.txt";
foreach (<TEST>)
{
print $_; # or whatever you want to do with the contents of the file
}
close TEST;
To go through all the files, use File::Find:
use File::Find;
find(\&printit, 'Y:\default\main\Test_Shared\WORKAREA\test');
exit;
sub printit
{
open TEST, "$_";
foreach (<TEST>) { print $_; }
close TEST;
print "File was: $_\n";
}
Hope this helps,
Jonathon
Interwoven Architecture Consultant