magneto Posted April 8, 2013 Share Posted April 8, 2013 Hi, I have a lot of hip files I created on disk, and I don't remember what a particular one I am looking for is called. I only remember what objects I loaded from disk (obj files), and certain operations I did on this geometry. Is there a way to maybe list files that only has a certain operator inside like File SOP and then maybe query the path of the geometry file used in this File SOP? Or this not possible? Thanks Quote Link to comment Share on other sites More sharing options...
edward Posted April 9, 2013 Share Posted April 9, 2013 .hip files are mostly ASCII, so try using the Windows search and turn on search within contents. 1 Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted April 9, 2013 Share Posted April 9, 2013 (edited) Use powershell. $file = Get-Content yourFile.hip $result = $file.Contains("file") Now, create pipeline function and it will filter all the files you want. You can use RegularExpressions there to. EDIT: If you are interested in creating more advanced utility with powershell I would go with writing extension for this task in C# instead of clean powershell. First, you got VisualStudio for your disposal (and if you have Resharper plugin you know how good experience it can be). Second, it's easier to create pipeline extension in C#, at least for me it's more readable. Than just install *.dll into powershell and vouila. Your hiper-duper search function ready to use: http://blogs.msdn.co...t-included.aspx " One Function to search through them all, One Function to find them, One Function to bring them all and in the darkness bind them." - EDIT 2: you should check for string similar to this => "type = null" or "type = file", I hope you get the idea Edited April 9, 2013 by mantragora 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted April 9, 2013 Author Share Posted April 9, 2013 Thanks alot guys, I didn't know I could search within hip files. Although when I did (after activating the search within files feature in Win7), it still didn't seem to return the files that uses certain node types. I opened some hip files in notepad, but they didn't look like ascii. Is it because by default hip files are binary? A C# app that searches contents would be extremely useful. You could search probably by type, keywords, etc. I could write a standalone app if I can find some time, but I am sure someone must have done it before me Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted April 9, 2013 Share Posted April 9, 2013 Is it because by default hip files are binary? It's because you are using wrong Notepad => http://notepad-plus-plus.org/ Powershell ISE also can view them correctly. 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted April 9, 2013 Author Share Posted April 9, 2013 Thanks mantragora, I never used either. I should download notepad++ then because I never got into powershell Is it also not possible to view using VS2012? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.