The Hurricane Forum
The Hurricane Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Hurricane for AutoCAD
 New Feature Request
 SAVEAS Options [FILE RENAMER]

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Attach a File

Check here to subscribe to this topic.
   

T O P I C    R E V I E W
n/a Posted - January 03 2005 : 7:25:26 PM
I often have to produce duplicate drawing sets, where the only difference is the equipment number and drawing number. The drawing changes are easily achieved with a "search & replace", "MTEXT search & replace", and then prehaps a title block revision change.

But then I am left with several hundred drawings to rename. 99% of the time, the drawing numbers are in simply a new series (eg 13000 changes to 14000). Could a search and replace feature be added to the "SAVEAS" tab?

Your program has given me, my life and sanity back.

Gavin Harkness
28   L A T E S T    R E P L I E S    (Newest First)
n/a Posted - April 28 2005 : 11:55:11 PM
Thanks for the new tool, can't wait to use it!!!
Miksteele Posted - February 01 2005 : 08:16:38 AM
TAB Name Ideas...

Lets say the TAB currently named REPLACE is changed to First/Last. And within this TAB you could add a radio button to the left of "Replace the first..." And just below that row would be a second row with a radio button and a "Replace the last..."

Then you could just change REPLACE # 2 to REPLACER or something...

As for TAB order... Your USERS will all want their favorite TAB first... or at least on top as a default. Dare I say Customizable default TAB? Better not...

BTW... I really like the F2 functionality you added!
Miksteele Posted - February 01 2005 : 07:55:57 AM
Oh Yeah! I see Wow... You're kicking in some ultra power from the get go!

The mistake I was making was I was hitting PREVIEW a 2nd time. But, doing that must actually clear the COMPOUND possibly behind the scenes. (was that intended? As I re-read your prior post it looks like that may not have been intended.)




Admin Posted - January 31 2005 : 9:34:18 PM
If you press the "Preview Button", it makes the changes between the Before and After columns.

So if you change the contents of the text boxes, then press Preview again, it OVERWRITES what you did the first time you pressed "Preview".

If you press the "Compound" button, it compounds the change, as it makes the changes to what is ALREADY in the "After" column.

It's a little confusing, but I'm sure you'll get it after you play with it.

Regards,
Bill
Miksteele Posted - January 31 2005 : 9:17:30 PM
Wow! That was FAST! and veryyyy usable!

Help me out for a minute... What does the "Compound" button do? What's being compounded? I keep hitting it, but...

ehh, I'll play with it a little more tomorrow... GOOD WORK Bill!
Admin Posted - January 31 2005 : 7:02:53 PM
Ok! A Quick update...

I've added a "Replace #2" tab (who knows what it should be called (that will fit in the tab field?))

There is an additional button tentatively named "Compound"... (I have no idea what to name it...? It will perform the search and replace on the "After" column, only after the "Preview" button is pressed at least once.

(This could be fixed somehow so that there isn't two buttons... just a matter of figuring out how to do it, so people would find it intuitive. Maybe populate the "After" column automatically when the "Replace 2" tab is clicked... hmmm... but then there would be no way to load it again after it is "Cleared" (another button I added to be able to "reset" the "After" column. I will stew on this a while.

I've tested it across different directories like your example, and it works (only if the filenames are unique... (this will have to be fixed, as the name collisions are actually false because they ARE in different directories). This leaves me something to work on!

All the names for the tabs and buttons are preliminary, so if you have a suggestion, even the tab order is a little annoying to me . Maybe it should be:

Renumber, Pad, Replace #2 (SnR?), Replace, Insert, Append

Regards,
Bill

Download Attachment: hurricane6.4.5.zip
176.27 KB
Admin Posted - January 31 2005 : 4:56:27 PM
Yes! I follow... Good idea... it saves having to exit the tool, then come back in again.

I think I can do something like that...

I'll get to work on it right away... I'll post the update soon!

Regards,
Bill
Miksteele Posted - January 31 2005 : 3:48:35 PM
I'm not sure I understand what you mean... "bump down" and "bump up".

The renaming tool I can see us using would be a string REPLACER in the form of replace THIS with THAT. Try to follow me... Say I'm queued up as shown below.

636_20050111_0012.dwg
636_20050111_0011.dwg
636_20050111_0010.dwg
636_20050111_0009.dwg
636_20050111_0008.dwg
2247_20041108_0011.dwg
2247_20041108_0010.dwg
2247_20041108_0009.dwg
2247_20041108_0008.dwg
2247_20041108_0007.dwg

Say... On my STRING REPLACER TAB I would enter:

Replace: 20050111 With: JOB_115

After I FINALIZE IT, I would have a list like:

636_JOB_115_0012.dwg
636_JOB_115_0011.dwg
636_JOB_115_0010.dwg
636_JOB_115_0009.dwg
636_JOB_115_0008.dwg
2247_20041108_0011.dwg
2247_20041108_0010.dwg
2247_20041108_0009.dwg
2247_20041108_0008.dwg
2247_20041108_0007.dwg

Then, (while still in the String Replacer TAB), I could:

Replace: 20041108 With: JOB_115

After I FINALIZE IT, I would have a list like:

636_JOB_115_0012.dwg
636_JOB_115_0011.dwg
636_JOB_115_0010.dwg
636_JOB_115_0009.dwg
636_JOB_115_0008.dwg
2247_JOB_115_0011.dwg
2247_JOB_115_0010.dwg
2247_JOB_115_0009.dwg
2247_JOB_115_0008.dwg
2247_JOB_115_0007.dwg

Again, (while still in the String Replacer TAB), I could:

Replace: 2247 With: 636

THEORETICALLY... After I FINALIZE IT, I should have a list like:

636_JOB_115_0012.dwg
636_JOB_115_0011.dwg
636_JOB_115_0010.dwg
636_JOB_115_0009.dwg
636_JOB_115_0008.dwg
636_JOB_115_0011.dwg
636_JOB_115_0010.dwg
636_JOB_115_0009.dwg
636_JOB_115_0008.dwg
636_JOB_115_0007.dwg

This final FINALIZE IT probably told should tell me that it was unable to rename... (BECAUSE of the filename duplications) So I think what I have done is just illustrated your problem, (most likely not the only issue I'm sure ).

The only reason my example would go through is if my original 636... drawings were in a different folder from my original 2247... drawings.

I realize that I am probably NOT helping you . I just wanted to show you an example renaming approach that some may take. My REAL WORLD renaming tasks would never lead me to doing all 3 renaming passes shown above. One or two passes of zero-conflict criteria would have been entered and I'd be on my way...
Admin Posted - January 31 2005 : 07:26:04 AM
Yes... I could do something like that... what if you can select which files to Rename in the Queue (highlight them, before opening the Rename Tool), and only those files will be shown.

However, naming conflicts are even more likely if only attempting to rename partial lists. It just means that when renaming files in a directory, it may take several passes, to rename. I.e. rename to bump a bunch of drawings down, then rename some other files to bump them up to "insert" them in between the old drawings. I'm not sure if I'm making sense, as this is pretty hard to explain in words.

This is a first try, so I just wanted to put it out there for some critique. Please try to break it (which I'm sure you will do pretty quickly!)

Thanks again,
Bill
Miksteele Posted - January 29 2005 : 4:27:04 PM
A SEARCH & REPLACE may only have matching criteria to change a few of the queued files. Each of the present TABS change ALL of the files. That's all.
Admin Posted - January 29 2005 : 3:45:13 PM
quote:
Originally posted by Miksteele

My final thoughts...

Possibly this SEARCH & REPLACE TAB thingy I mentioned doesn't really work with the way the renamer is setup right now. I looks like the renamer must "touch" every queued file. Is there room for a conditional type of renaming that a SEARCH and REPLACE would offer?



Hmm... I'm not quite sure if I understand... please explain!?!

Thanks,
Bill
Admin Posted - January 29 2005 : 3:37:09 PM
Ok...

Here is a quick update to fix a couple of the fairly easy things... my schedule was tight today, so the more major items will have to be put into a list for my next "session".

quote:
Possible BUG...
The default modifier for the RENUMBER TAB appears to be OVERWRITE. However, it isn't ticked when you first open the renamer. This may throw someone off possibly? It's onlt the initial window... if you click to another tab and then go back it's ticked!

You, a bug for sure... it's fixed.

quote:
Another thing I noticed... If someone has very long names, they won't be able to see what they are starting with much less what going to happen. Up to roughly 25 character is no problem. I just checked some of our longer named files and noticed that some could be around 35 character with the extention. We don't usually need to rename these long ones, so I'm not worried about it.

Good call... I've added some scroll bars to help.

oh! Another thing I didn't mention previously... if you have a longer list of files, then press the Preview button... if you VERTICALLY SCROLL, the two lists are synchronized... so you can see a true before and after...
quote:
Is a REPLACE LAST option workable on your end Bill?

Yep... I'll put it in soon... but this is all I could fit in today...

Regards,
Bill

Download Attachment: hurricane6.4.4.zip
175.41 KB
Miksteele Posted - January 29 2005 : 3:15:52 PM
My final thoughts...

Possibly this SEARCH & REPLACE TAB thingy I mentioned doesn't really work with the way the renamer is setup right now. I looks like the renamer must "touch" every queued file. Is there room for a conditional type of renaming that a SEARCH and REPLACE would offer?

This is a GREAT tool Bill! Thanks.


Miksteele Posted - January 29 2005 : 2:27:26 PM
Another thought...

SEARCH & REPLACE TAB
...find THIS and replace it with THAT could do a lot. This may be the one I would use most often. (I have often found that it is also easily understood when instructing others). Could be used to accomplish a REPLACE in the middle of a filename as well as REPLACE first and REPLACE last.
Miksteele Posted - January 29 2005 : 2:22:19 PM
Neat-O!

Okay... So each tab works separately. That works for me!

I figured out how to "strip" away the beginning part of the filename using the REPLACE tab and leaving the second field blank. But, how would I "strip" part of the filename away at the end though Or rather... How would I replace the end portion of the filename? Is a REPLACE LAST option workable on your end Bill?

The ability to also rename manually by double clicking is tremendous! I noticed that you still have to click finalize though. I can understand this and I am perfectly able to do it , but it seems that in order to get what you want, you MUST first find a TAB (hit preview), that isn't going to do something else to the filename. Is this the best way?

Possible BUG...
The default modifier for the RENUMBER TAB appears to be OVERWRITE. However, it isn't ticked when you first open the renamer. This may throw someone off possibly? It's onlt the initial window... if you click to another tab and then go back it's ticked!

Another thing I noticed... If someone has very long names, they won't be able to see what they are starting with much less what going to happen. Up to roughly 25 character is no problem. I just checked some of our longer named files and noticed that some could be around 35 character with the extention. We don't usually need to rename these long ones, so I'm not worried about it.

Should I try to break it! I didn't attempt anything weird yet.

Seems to work pretty darn good! Thanks a lot!
Admin Posted - January 29 2005 : 10:40:30 AM
Ok!

I am happy to present this as a first kick at the can...

I must warn everyone who downloads and tries this update!

1) THIS IS BETA... DO NOT USE THE RENAME TOOL TO RENAME YOUR ORIGINAL FILES, ALWAYS WORK ON A COPY OF THE ORIGINAL. IF SOMETHING GOES WRONG DURING THE RENAMING PROCESS, DON'T ASK ME FOR YOUR FILES BACK, BECAUSE I DON'T HAVE THEM.


2) Each of the Rename tabs has a "Preview" button, so you can see what the expected changes are going to be BEFORE you hit the "Finalize It!" button. The PREVIEW button is benign, it doesn't actually change your filenames, the FINALIZE IT button makes it permanent.

You can do some wicked damage to your filenames with misuse of this feature. There are no secondary warnings like "Are you sure?", "Are you really sure?" etc... Once you hit "Finalize it!", the files will be renamed (except if there is an error message i.e. duplicate files).

3) Although I've tested it on short lists, you might want to "play" on dummy files until you get comfortable with this tool. With just a few passes of this tool you can drastically change your filenames.

Enough with the Disclaimers...

4) The Rename function only works on whatever files you have in your QUEUE. So if there aren't any files in the Queue, the Rename Tool will appear "greyed" out in the Tools menu. (You can also press CTRL+R to bring this tool up)

5) The rest is pretty well self explanitory. But because this is my first draft, please test it thoroughly and post your comments in this thread. I will attempt to fix bugs immediately on this feature.

6) If you double-click the files in the "After" list you can manually edit the filenames to your desire (in case you have a naming conflict and want to fix it on the spot)

Upcoming additions:
6) Yes, Miksteele, I am considering enabling TAG usage in all the fields. (Just not quite yet...)

7) Drawing preview window

8)

There is some minimal ERRORCHECKING, but obviously I haven't been able to catch everything. Please post any bugs discovered to this thread, and I'll try and fix them quick.

Enjoy, and please be careful!

Download Attachment: hurricane6.4.3.zip
175.46 KB

fuzzman Posted - January 28 2005 : 09:20:27 AM
Hi All!! Boy am i one happy camper that you are working on a file renamer. My hand is so tied or remaning files that its starting to turn retarted. Really though the idea of haveing a simple way to rename drawings for a different series number is great. I to have to copy a set of drawings just to rename them for the next system being installed. PLEASE let me know when this complete, I'd even pay for it, but in the mean time i'll try out one of the programs mentioned in the discussion group. Thanks a Ton! From all of us waiting patiently here at Corning Inc.
Admin Posted - January 04 2005 : 5:25:16 PM
Hahah!! LOL!

Well, you are back in true form!

Bill
Miksteele Posted - January 04 2005 : 5:08:33 PM
Simple is good of course, especially in the beginning!

I figured I was slacking a bit... haven't asked for anything ALL YEAR up till today.
Admin Posted - January 04 2005 : 5:03:32 PM
I have a feeling that there is something looming in the distance... muhahah...

Yes, I asked for a scope list... (I should have known!!!)

No problem... I can take it... I'll try my best... for now I'll keep it simple and fairly straight forward! , then soup it up!
Miksteele Posted - January 04 2005 : 4:58:22 PM
OMG!!! Is exactly the response I was hoping to get I guess you can consider the dialog started

...You asked for a scope list... right

Thanks!
Admin Posted - January 04 2005 : 4:42:00 PM
OMG!



I have created a monster!

Wow... I can appreciate your idea, and I think it would be something to strive towards. What I will do is something first that EVERYONE will be able to use first!? , then I'll hot-rod it all up with META's and the like... Good of you to document it all, I will consider it as things progress...

I'll try to keep it simple for the time being (to start )

Regards,
Bill
Miksteele Posted - January 04 2005 : 12:44:31 PM
PACE you got me thinking some more...

In your situation you are actually NEEDING to rename the file and update that information on your drawing... If this were 100% scriptable we would need a SUPER SMART SCRIPT. Let me try to describe my thoughts here .

Hurricane reads the "user script" and compiles the "real script" for AutoCAD. Basically it applies everything in the "user script" to each drawing in the queue. Thus, the length of the "real script" is roughly the length of the "user script" multiplied by the number of QUEUED files. Now, lets says this SUPER SMART SCRIPT works dynamically with the filenames in the queue and the replace THIS with THAT functionality. Hurricane already knows all this information! It's just a matter of how it compiles the "real script"!

Okay... Lets say the QUEUE is loaded with drawings 1400 through 1410. You want drawing 1400 to be renamed as 1500 and then you want to do the same search and replace TEXT & MTEXT in AutoCAD. (1401 to 1501, 1402 to 1502...etc). Instead of typing in 1400=1500 we could have an increase increment ability! So Hurricane would just read the filename in the queue and you would choose what increment, TENS, HUNDREDS, THOUSANDS...etc. Maybe even choose increment INCREASE or increment DECREASE. See if my META example makes some sense of all this...

;RENAMER=TRUE
;RENAMER.REPLACER=TRUE
;RENAMER.REPLACER.$FILENAME$=$FILENAME.INCREMENT.INCREASE.HUNDREDS$
;RENAMER.FORMATTER=FALSE
;RENAMER.QUEUEUPDATE=TRUE
(LOAD "Z:/HURRICANE/LISP/REPTEXT.LSP")
;-------------
REPTEXT
$FILENAME$
$FILENAME.INCREMENT.INCREASE.HUNDREDS$
Y
N
N
ALL

;-------------
-VBALOAD "$HUR_PATH$LISP/Mtext.dvb"
-VBARUN MTEXT.SearchAndReplace
$FILENAME$
$FILENAME.INCREMENT.INCREASE.HUNDREDS$
VBAUNLOAD "$HUR_PATH$LISP/Mtext.dvb"
;-------------



I possibly have oversimplified this to make my point. However... If we had a TAG like $FILENAME.INCREMENT.INCREASE.HUNDREDS$ it seems to work
Miksteele Posted - January 04 2005 : 12:11:20 PM
Sounds pretty darn good Bill

A) Regarding # 1)...When you say separate form. Do you mean another TAB to the right of the "SAVEAS OPTIONS" tab If execution was done without a script, would it have a GO button or something within the new RENAME FILES tab Or would all this have to be executed using the right context menu from the QUEUE

B) Your # 3) is right on! Especially the automatic QUEUE updating part

C) Would the blank form you mentioned in your # 4) be accomplished by an additional TAB (like my A) I think that it should only work on files in the QUEUE. It seems "safer" that way and it's where everything else is "worked on" in Hurricane.

D) The renaming options we would use would be a REPLACER and a FORMATTER. The REPLACER would simply replace THIS with THAT. The FORMATTER would allow a number of things... for starters serial numbering, or what Hurricane calls the $COUNTER$ TAG. If one wanted to number their files, the FORMATTER could be setup using Hurricane's TAGS as follows:


$COUNTER$$FILENAME$

or reversed as:

$FILENAME$$COUNTER$

or just:

$COUNTER$

possibly even:

$FILENAME$_$PROJECTTAG1$_$MM$-$DD$-$YY$

It could be limitless! Using the $FILENAME$ tag within the FORMATTER allows you to prefix or suffix the current filename. I see many many different TAGS that would be useful here.

E) Okay... now for the million dollar question. Would these be script-able via META? Say I want to replace THIS with THAT. I could load my QUEUE with my FILELIST and select my "replace THIS with THAT" script and... (of course I don't need to open AutoCAD, this is where my questions on execution come from). If scriptablity is possible... maybe the META could be set up like:

;RENAMER=TRUE
;RENAMER.REPLACER=TRUE
;RENAMER.REPLACER.THIS=THAT
;RENAMER.FORMATTER=FALSE
;RENAMER.QUEUEUPDATE=TRUE

or...

;RENAMER=TRUE
;RENAMER.REPLACER=FALSE
;RENAMER.FORMATTER=TRUE
;RENAMER.FORMATTER=$FILENAME$$COUNTER$
;RENAMER.QUEUEUPDATE=TRUE

What do you think


n/a Posted - January 04 2005 : 05:03:51 AM
After some further thought: There are the times where, on small projects, a non-ten based drawing series are allocated (ie 150). E.g.the first series starts at 1500, the second 1650, third 1800, etc

Renaming these sorts of files, with a standard sort of search&replace, would be tricky, let alone scripting the drawing changes. This is where the combined text and Mtext search&replace dialog would be handy (mentioned in another topic)

Just another puzzle to consider.

Thanks for your quick and positive response, these additional features, to me, are a nice to have. There are other programs available to rename files, most do a decent job, for the majority of my work, but none are written with AutoCAD file renaming problems in mind. If you can get the functionality right, it becomes another string in your bow.

Gavin Harkness

Admin Posted - January 04 2005 : 12:08:19 AM
Cool..

So, this is what I'm thinking...

1) Make a separate form just for this function, and it will perform the renames WITHOUT using a script. It will just do it in the background.

2) Have it envoked from the right-click in Queue? I think that there should be a "Rename" then a sub-menu, for "Single File" (Currently Selected single file), "All Files" (as you can control what is currently in the Queue), as well as "Swap Filenames" (That's the one I'll use a lot)..

3) I assume that one would use the list of files in the Queue as a "starting point" for files to rename, rather than the "Drawing File Selector", or I can make an option between them when selected. (I think the Queue would be the better way to go, as you can control what is in the Queue... If renaming files in the Queue, then the list of files in the Queue will be effected, and will need to be refreshed (automatically preferrably).

4) Maybe just a blank "renamer" form, and you can then choose to import the Queue list, or drag-drop files from Explorer in, or go to the Drawing File Selector directory. Any ideas?

The fun part will be filename collision detection... wow, I can hardly wait! I'm getting a few things sorted out, and I'll start monkeying around with this a bit... and see where it goes...

I just like to throw down all ideas before I start, so there is some sort of scope of work.

Feel free to keep throwing the ideas!

Thanks again!
Bill
Miksteele Posted - January 03 2005 : 10:53:37 PM
Excellent PACE!!!

How about a "string replacer" within the renamer, (Find & Replace). Bill, wouldn't this approach take care of your examples 1, 2 and possibly even 3... depending on how smart you make it!

This could solve many of our renaming issues, IF NOT ALL! Replacing the Xth character would be hard to implement with our setup. Character strings in our filenames mean something to us and would be easily executed... (I can see myself scripting METAS to do all my renaming already )

My users keep Hurricane open ALL day. It is already much more than a scripter.
Admin Posted - January 03 2005 : 8:42:18 PM
Hi Gavin,

Thanks for your comments!

Funny you should ask about that.

I was just debating on what to do about that sort of thing.

I typically use a secondary program to rename the files like
MultiRen http://www.74mph.com/forum/uploaded/bk/2003329134826_multiren.zip, or Rename Master (http://www.joejoesoft.com/rm.php)

I've use both these tools when required, Multi-Ren is a little more complicated to use (you must study the Template Syntax (in the Help File) to fully appreciate how powerful it is), however RenameMaster is easier to use, but has a lot more "user interface" to navigate.

Try both to see if either can help you in the meantime.

As far as Hurricane goes, I'd like to have some simple renaming functions included in the SAVEAS tab, or somehow integrated into the Queue screen (the right-click menu). It's all a debate as to how closely (if any), I want to integrate Hurricane into "becoming" more like Windows Explorer. I really hate to replicate features that are already present inherently in Windows itself (like rename/datestamp etc), and other available software.

HOWEVER, there can be some room here for a "quick" addition to speed up a commonly needed problems.

1) So, we need a "replace Xth character" function, as basically all you need to do is change the 3 to a 4, at the same position in the filename? right?

2) I would assume this would also need a "replace first X characters with ____ " function. This would take care of changing "BIGPROJ" to "SMALLPROJ"
A "replace last characters" function would be counterproductive, as I would think that 99% of users would always have their files numbered? Anyone?

3) I was also thinking of a "Swap" filenames function in the queue (I can't tell you how many times this happens to me... where I want to change the order of files quickly, and must rename to a dummy filename before I can rename another file in it's place. This would be fairly easy to accomplish.

Lets keep the dialog going, so the others can jump in and throw this around and see what sticks... maybe someone has something to add.

Thanks,
Bill

The Hurricane Forum © 2009 - 2021 Go To Top Of Page
This page was generated in 0.29 seconds. Snitz Forums 2000