Remove blanks / spaces in filename + Commands

Home Forums PDF24 Creator General Remove blanks / spaces in filename + Commands

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #919
    joan torrents
    Participant

    When launching a command with a filename that contains blanks/spaces the command fails to execute.

    In order to avoid this i add a line containing a single space in the characters to remove in filenames but i think that it's not working and blanks/spaces are not removed.

    Below i post the config i use to launch an outlook message with the PDF attached, but the spaces in the name of the file make it to crash.

    If instead of using [Filename = $filename] i use [Filename = $id] it works but the email has an attachment with a very ugly name.

    Please, is there any way to remove all the blanks/spaces in filenames?

    CONFIG:
    Action = Sava docs after printing
    Destination folder = %temp%
    Filename = $filename
    Show progress = True
    Open folder after saving = False
    Overwrting file = True
    Execute command = True
    COmmand = "C:\Program files\Office\Outlook.exe" /c ipm.note /a $file

    Thx!!

    #1893
    pdf24
    Member

    Hi,

    the trick is to use quotes around the file argument. The following command should work:

    "C:\Program files\Office\Outlook.exe" /c ipm.note /a "$file"

    #1894
    joan torrents
    Participant

    YES! It worked!
    Thx guys!

    I would like to share my config, it's working fine with Outlook 2016
    I created a new printer called PDF-Email that creates a PDF and opens a outlook message with the PDF attached all in a single step

    PDF Printer tool
    [x] Automatically save documents after printed

    Auto Save
    Output directory = %temp%
    Filename = $fileName
    Profile = Best quality
    [x] Show progess while saving
    [_] Open folder after saving
    [x] Overwrite existing file
    [x] Execute following command after saving (Next line respect the colons)
    "C:\Program Files (x86)\Microsoft Office\root\Office\16\outlook.exe" /c ipm.note /a "$file"

    THANKS AGAIN!!!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.