Loading ...
Sorry, an error occurred while loading the content.

How do I handle file names with spaces?

Expand Messages
  • weigheyeman
    Hi, I am using a clip which runs a program from the shell (using the ^!Shell clip command. It doesn t seem to work for files with spaces in the name. Can
    Message 1 of 5 , Jan 17, 2008
    • 0 Attachment
      Hi,

      I am using a clip which runs a program from the shell (using the
      ^!Shell clip command. It doesn't seem to work for files with spaces in
      the name.

      Can anyone point me at the answer?

      I'm sure it's a common problem but I can't see it when searching for
      "file names with spaces"

      Thanks,


      Charlie
    • loro
      ... Does it work if you quote it? Lotta
      Message 2 of 5 , Jan 17, 2008
      • 0 Attachment
        Charlie wrote:
        >I am using a clip which runs a program from the shell (using the
        >^!Shell clip command. It doesn't seem to work for files with spaces in
        >the name.

        Does it work if you quote it?

        Lotta
      • ebbtidalflats
        ... Charlie, the solution is to convert allfilespecs (path and name) using the ^$GetShort()$ function -- which converts long names to 8+3, but incidentally
        Message 3 of 5 , Jan 17, 2008
        • 0 Attachment
          --- In ntb-clips@yahoogroups.com, "weigheyeman" <m4jza3@...> wrote:
          >
          > Hi,
          >
          > I am using a clip which runs a program from the shell (using the
          > ^!Shell clip command. It doesn't seem to work for files with spaces in
          > the name.
          >
          > Can anyone point me at the answer?


          Charlie,

          the solution is to convert allfilespecs (path and name) using the
          ^$GetShort()$ function -- which converts long names to 8+3, but
          incidentally handles spaces in the name as well.

          I suspect you will have to quote the long name in the function, and
          perhaps convert to a variable before passing it to the shell:

          ^!Set %short%=^$GetShort("longpath and filename")$


          Cheers,


          Eb
        • sisterscape
          ... Quotes are the solution to the problem in Wine on Linux. But the real solution is to not create files with spaces. It is a bad idea IMO especially if you
          Message 4 of 5 , Jan 17, 2008
          • 0 Attachment
            --- loro <loro-spam01-@...> wrote:

            > Charlie wrote:
            > >I am using a clip which runs a program from the shell (using the
            > >^!Shell clip command. It doesn't seem to work for files with spaces
            > in
            > >the name.
            >
            > Does it work if you quote it?
            >
            > Lotta
            >
            >

            Quotes are the solution to the problem in Wine on Linux. But the real
            solution is to not create files with spaces. It is a bad idea IMO
            especially if you are putting any of these files on a Linux
            server/environment.




            ____________________________________________________________________________________
            Be a better friend, newshound, and
            know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
          • weigheyeman
            Hi everyone. The short file names work and the quotes also work. For me the quotes are the best solution because the application that I am running creates
            Message 5 of 5 , Jan 18, 2008
            • 0 Attachment
              Hi everyone.

              The short file names work and the quotes also work. For me the quotes
              are the best solution because the application that I am running
              creates files that have the same file name as the input i.e.
              file name.txt,
              file name.log.

              The short file name solution creates file names that are not the same
              as the application input file.

              Thanks for your efforts,


              Charlie
            Your message has been successfully submitted and would be delivered to recipients shortly.