×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Remove Text fro String

Remove Text fro String

Remove Text fro String

(OP)
When I convert files from one design software to another the file name retains the old extension only with the "." replaced with and "_". Is there a way to search the file name for and remove specified text?

Converted file = XXXXX-XXXX_CATPart.prt or
XXXXX-XXXX_CATProduct.prt
Needs to be XXXXX-XXXX.prt

The character count from the left varies depending on the file name.

Thanks,
Kevin
Replies continue below

Recommended for you

RE: Remove Text fro String

(OP)
Sorry, yes VB.Net. Thanks for the helpful links. Would you recommend cycling through an NX8 assembly doing a save as on each file? Or is there a better way to automate it?

Kevin

RE: Remove Text fro String

Cloning the assembly would probably be the preferred method, but it may be harder to code. I'm not sure the journal recorder supports the cloning process just yet. If you try the cloning route, you may need to see if GTAC has some examples.

www.nxjournaling.com

RE: Remove Text fro String

(OP)
Wish I could, our firewall has them blocked for some reason. our IT dept is looking into it.
I am currently cloning and modifying the log file to change the names. My hope is to automate it to try to eliminate human error.

RE: Remove Text fro String

This would have worked in VB6. Not sure about not.dot
NAME XXXXX-XXXX_CATProduct.prt AS "XXXXX-XXXX.prt"

I hate Windowz 8!!!!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close