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)
perl script that will read dcrs
rodigz
hi all,
I need ideas please.. Here's the thing that I need to do.
I need to read ALL dcrs in the Y drive that has a particular string value let "sample" and the path. Then I want to write it a text file delimented.
e.g. output
sample;//server/default/main/company/test/WORKAREA/one/templatedata/English/Sample/data/UK/DCR1
sample;//server/default/main/company/test/WORKAREA/one/templatedata/English/Sample/data/UK/DCR1
sample;//server/default/main/company/test/WORKAREA/one/templatedata/English/Sample/data/UK/DCR1
etc..
ideas?
thanks.
Find more posts tagged with
Comments
Jamik
should be pretty easy. we've done stuff like that here. just write some code that traverses the directory structure on the y: drive and only looks at files in the .*/templatedata/.*/data folder since that should be all your dcrs and then when you look at files there just look for whatever it is your looking for. If the file meets your search criteria just print the filepath to a logfile.
rodigz
great. thanks.
Did you use any teamsite modules?
Jamik
The File module is all I pretty much use for that. If i want to get the EAs I will call iwextattr in my code and sometimes I use the TeamSite::Config module. But for just file traversal the File module should be enough.
nipper
Search the tech lib, I posted a couple of articles to do stuff like this.
If not send me an email, I have a ton of scripts I have written (for Unix),
converting for DOS usage should be easy
Andy