Skip to content

Filename macro

I need to access the filename of a document via a macro, eg

[Document]
type=file
filter=DOC|*.doc

...I need to be able to access what the filename is, eg cherubs.doc

The closest I could find was %spinfilename-<folder>, but I only need it for the file specified. If this macro doesn't already exist then something like %filename-document% would be great.

Comments

  • SvenSven www.GSA-Online.de
    the macro you need is probably %spinfilename-<folder>%
  • cherubcherub SERnuke.com
    That method doesn't seem to be viable without hardcoding the folder. I'll need the data from both
    %spinfilename-<folder>%
    %spinfolder-<folder>%

    but if I try and use a variable for the folder eg
    %spinfilename-%doc_folder%%
    %spinfolder-%doc_folder%%

    and I have a variable setup like this

    [doc_folder]
    type=text
    default=C:\Program Files (x86)\GSA Search Engine Ranker\mydocs\

    the result is 
    pagefiledoc_folder%%
    doc_folder%%

    Is there any way to use a macro in the spinfilename/spinfolder macros, or another workaround for this you can think of?
  • SvenSven www.GSA-Online.de
    if you use nested macros, you would need to use the second one with $macro$
    %spinfilename-$doc_folder$%
    %spinfolder-$doc_folder$%
  • cherubcherub SERnuke.com
    This didn't seem to have the desired effect, but I think I have a workaround for the problem. As always, thanks for your help @Sven:)
Sign In or Register to comment.