cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Mapkey to delete export log files

SOLVED
jwagh
16-Pearl

Mapkey to delete export log files

My goal is to delete the DXF and DWG export log files that get created. If anyone knows of a setting to prevent them from even being created, that would be appreciated. However, I don't think there is. So I'm trying to do it using a mapkey. The location of the log files is the working directory. If I use the full path in the mapkey, it works. But I would like to use some Pro/E command that will automatically know the path.

Works:

mapkey dl @SYSTEMdel C:\\Users\\BOB\\Desktop\\*__out.log.*;

Doesn't Work:

mapkey dl @SYSTEMdel C:\\proe_dir\\*__out.log.*;

mapkey dl @SYSTEMdel proe_dir\\*__out.log.*;

mapkey dl @SYSTEMdel %proe_dir\\*__out.log.*;

mapkey dl @SYSTEMdel %proe_dir%\\*__out.log.*;

Any thoughts on this?

Is there a good resource on using the SYSTEM command for the mapkey besides just using regular dos commands? Like any Pro/E specific commands (if there is one for the current directory.

Thanks!


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
1 ACCEPTED SOLUTION

Accepted Solutions
jwagh
16-Pearl
(To:jwagh)

Ok.

So I figured out how to do this, although it still doesn't answer my questions.

It appears to me that once the user is in the working directory, the del command will work without a path.

So using the below works:

mapkey dl @SYSTEMdel *_out.log.*;

View solution in original post

5 REPLIES 5
jwagh
16-Pearl
(To:jwagh)

Ok.

So I figured out how to do this, although it still doesn't answer my questions.

It appears to me that once the user is in the working directory, the del command will work without a path.

So using the below works:

mapkey dl @SYSTEMdel *_out.log.*;

View solution in original post

Jose_Costa
5-Regular Member
(To:jwagh)

I haven´t found a good solution for this too.

I always export to the same folder, so I created a mapkey that calls a batch file to delete junk files in that specific folder.

Every time I export something through my mapkeys this batch file is called and the folder is cleaned.

Not perfect, the best for now.

Jose

thanks for your response. I'm pretty happy now with the fact that I no longer need a path, since the session is already at the right location. The del filename works fine. You might be able to do that too without a batch file - just another few lines of code or another mapkey.

Inoram
12-Amethyst
(To:jwagh)

If you are set on doing it through Pro, I'm not sure. But the way I do it is with a purge batch file, right mouse-click in Windows Explorer type way. If you are interested in that I talked about it here.

http://communities.ptc.com/thread/52283?tstart=30

jwagh
16-Pearl
(To:Inoram)

My method is just within the mapkey, I use:

mapkey(continued) @SYSTEMdel *__out.log.*;\

mapkey(continued) @SYSTEMdel current_session.pro;\

mapkey(continued) @SYSTEMdel Mapkey.idx;\

Announcements