Jump to content

What's the best way to search for a hip file?


Recommended Posts

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 :)

Link to comment
Share on other sites

Guest mantragora

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 by mantragora
  • Like 1
Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...