Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Using iwregen CLT to go to Subdirectories
mbjennings
Can I use the "iwregen" CLT to regenerate all of the files that exist in the subdirectories of a folder. I have tried using the following code. /iwhome/bin/iwregen /pathtoworkarea/foldername/*.*
and even * after the slash, just to get everything. But that doesn't work for me. I have to actually go into each and every subfolder to regenerate everything. Is there another way to do this. I am using Teamsite 4.5.1 . Please let me know
Find more posts tagged with
Comments
Migrateduser
find /pathtoworkarea/foldername/ -type f -exec /iwhome/bin/iwregen {} \;
The above is pretty simplified. In actually a cleaner way would be to check and make sure each file found is actually a generated file before attempting to run iwregen on it, but the idea is the same.
iwregen is only meant to run on a single file or a list of files. Another option might be to use a script to build a list of file paths that you want regenerated and pass the file list to iwregen all at one time (instead of calling iwregen multiple times).
Adam Stoller
find /pathtoworkarea/foldername/ -type f -exec /iwhome/bin/iwregen {} \;
Actually, if you're on Unix, since iwregen will take multiple files, using
xargs
would probably be more efficient than using
-exec ... {} \;
:
find /
areavpath
/
foldername
/ -type f -print | xargs
iw-home
/bin/iwregen
(see
man xargs
for more details on its usage)
As near as I can tell -
iwregen
might only display an error message (and not exit with a non-zero status) when it is asked to process a non-TeamSite Templating generated file. While this might be considered a bug - it should allow you to do the above
find
command without worrying about it erroring out in the middle.
--fish
(Interwoven Senior Technical Consultant)
mbjennings
Why does it not Regenerate all of the Templated files. I went inot teamsite and there are some files in the directory that are Generated Templated files, but they were not regenerated. Is this a bug also.
james1
If you use iwregen to regenerate a file based on Templating, then the file will NOT be overwritten if regenerating the file results in the exact same file contents as already exist in the file.
Perhaps this is why you perceive your files not getting regenerated?
-- James
--
James H Koh
Interwoven Engineering