Jump to content
Macro Express Forums

Expand filename: what does it do?


Recommended Posts

In my tests, this checkbox in the Variable Set from File Path command doesn't appear to make any difference.

 

MEPro-ExpandFilename.jpg

 

 

Anyone able to confirm that please? Here's a simple test macro (code and MEX).

 

There's no mention of this option in the Help for the command.

 

<TEXT BOX DISPLAY Title="Initial Instructions" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 Open an Explorer folder then close this message.\\f1 \r\n\\par }\r\n" Left="821" Top="Center" Width="390" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>
<TEXT TYPE Action="0" Text="<ALT>d" _COMMENT="Select the contents of the Address box, i.e. the folder name."/>
<TEXT TYPE Action="0" Text="<CONTROL>c" _COMMENT="Copy the folder name."/>
<DELAY Flags="\x01" Time="0.1"/>
<VARIABLE SET STRING Option="\x02" Destination="%tFolder%" NoEmbeddedVars="FALSE"/>
<REPEAT WITH FOLDER Path="%tFolder%" OnlyFiles="TRUE" Destination="%tFilename%" FullPath="TRUE" ProcSubfolders="FALSE"/>
<VARIABLE SET FROM FILE Filename="%tFilename%" Option="\x01" Name="%tName%" Extension="%tExtension%" Expand="FALSE" Flags="\x0C"/>
<TEXT BOX DISPLAY Title="Inside the Repeat Folder" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil Tahoma;}{\\f1\\fnil\\fcharset0 Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 Filename\\f1  = \\f0 %\\f1 t\\f0 Filename%\r\n\\par Name\\f1  = \\f0 %\\f1 t\\f0 Name%\r\n\\par Extension\\f1  = \\f0 %\\f1 t\\f0 Extension%\r\n\\par \r\n\\par \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>
<END REPEAT/>

 

--

Terry, East Grinstead, UK

TestExpandFilename.mex

Link to comment
Share on other sites

In my tests, this checkbox in the Variable Set from File Path command doesn't appear to make any difference.

There's no mention of this option in the Help for the command.

Why then, it's correctly documented, isn't it? :lol:

If it does nothing (and I get the same results as you), then why on earth should Insight document it? :blink:

Link to comment
Share on other sites

Why then, it's correctly documented, isn't it? :lol:

If it does nothing (and I get the same results as you), then why on earth should Insight document it? :blink:

 

 

Thanks for the confirmation.

 

Yes, I suppose it would require effort to actually remove it! ;)

 

--

Terry, UK

Link to comment
Share on other sites

The Expand the filename option was discussed previously: Expand filename: what does it do? This option changes a relative file path to a fully qualified pathname.

 

If the current directory is set to "C:\Program Files\Macro Express Pro" and the filepath set to '..\Common Files', Expand the filepath will change it to "C:\Program Files\Common Files". Expanding a path of "\Program Files" will add the drive letter resulting in "C:\Program Files".

 

There's no mention of this option in the Help for the command.

I have submitted a bug report to Insight Software so they can update the help.

Link to comment
Share on other sites

Good answer, I thought I had come across that before.

 

My question is how does one set the current folder? Might be nice to set a working folder for a macro and work with relative paths. Or is it the case that the current folder is only ever the working folder for the MEP shortcut?

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.

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.

Loading...
×
×
  • Create New...