Re: [Clip] File Name Clip and Loop Macro
- Hi Rayellen,
>1- I've got a nice clip that reformats, saves and closes a file,I have a number of Clips that work with directories in my
>but I've got 6000 files to do this to (all in 1 directory). Can
>someone give me the clip syntax for a loop that would run the
>macro sequentially on every single file in the dir?
DirStuff. You'll find some that you can modify to do what you
want. Look for ones that use ^$GetFiles instead of the ones with
the older method using ^$GetFileFirst/^$GetFileNext although those
still have good use for some purposes. Try right clicking over the
Library combobox and choose "Open as Document" and then do a Find
for ^$GetFiles. They'll use ^!SetArray.
NoteTabbers Assistant Library Page
Direct download for DirStuff
>2- When it saves the files, it needs to save it with a name that has^!Set %Drug%=^$StrReplace(" ";"";"^%Drug%";0;0)$
>no spaces or forbidden characters. I've got a variable I'd like to
>paste as the title of the doc, and also use as the file name, but
>when I paste it as the file name, I want to remove spaces.
>^!SaveAscii As "^$GetDocumentPath$^%Drug%.htm"
>But that doesn't work.
>Imagine that the value in the variable %Drug% is something like
>"8-HOUR BAYER", so my heading will be <h3>8-HOUR BAYER</h3> (which
>currently works fine), but my doc title should be "8-HOURBAYER.htm"
^!Save As "^$GetDocumentPath$^%Drug%.htm"
You can test with this:
^!Set %Drug%=^$StrReplace(" ";"";"^$GetSelection$";0;0)$
For the "forbidden characters" you would need to run the ^$StrReplace
once for each character. Something like:
Example: ^$StrReplace("o";"?";"NoteTab Pro";True;False)$
Result: N?teTab Pr?
The last two fields can be 0|1, No|Yes, or False|True
That is so for any of the true/false fields in functions.
Affiliate links for Fookes Software, thanks! :)
Fookes Software Home http://www.fookes.com/regnow.html?2448&item=home
NoteTab Home http://www.fookes.com/regnow.html?2448&item=notetab
Buy Fookes Software Now! http://www.fookes.com/regnow.html?2448