× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



John,

The IP address you gave is completely nonsensical. It's not possible to have a number like '999' in an IP address, as each number represents a byte, and each byte can only have a value from 0-255. I assume that the IP address you gave is not the real one -- but if it is, you might want to look into what's going on there...

As for handling special characters in the document name. The key things are:

a) Try to stay out of DOS mode. When you use 'start' or anything that makes it open up a DOS prompt, you run into more trouble with stuff like & and spaces. (Not to mention the ugliness of opening the black box on the PC)

b) Try to run some program name as the first parameter to the command-line. It's much less likely to choke on special characters if the document name is a parameter to a program vs. the first thing specified.

One thing that works quite often is to invoke Windows Explorer. For example, this works perfectly fine for me, despite having no carets or double quotes:

strpccmd pccmd('explorer \\192.168.2.1\sklement\profound\webinar Q & A.docx')

The reason it works fine is that I'm invoking Windows Explorer (a program) in the first parameter, and since it's a native Windows program, there's no need to open the Command Prompt ("DOS") environment...

The 'rundll32' method will work with a wider variety of different document types than 'explorer' does, but 'explorer' is much shorter, so if it meets your needs, you might use it.

Ugh, sorry this got so long-winded.

-SK


On 8/13/2015 4:03 PM, John Allen wrote:
I have searched the internet for the answer but I think I may have
reached the end of the internet without finding the answer



I am using STRPCCMD to display a file in the IFS



STRPCCMD PCCMD(' "\\192.168.9.999\EFILE\Rock Roll.PDF" ') Works fine
with a space between Rock Roll

I know that I have to enclose the path within double quotes since the
PDF file name contains a space





STRPCCMD PCCMD(' "\\192.168.9.999\EFILE\Rock^&Roll.PDF" ') Works fine
with an ampersand preceded by caret to display Rock&Roll.PDF

I know that the ampersand will cause STRPCCMD to think I am trying to
execute two commands so I need to precede the & with a caret ^





My trouble is when I want both a space and an ampersand between Rock
and Roll Example: Rock & Roll.PDF

STRPCCMD PCCMD(' "\\192.168.9.999\EFILE\Rock ^& Roll.PDF" ') Does
not work "\\192.1685.9.999\EFILE\Rock is not recognized as a command



What would the correct formatting be for having a space and an
ampersand in the file name?



I do not want to use the rundll32 method as it takes up too many of my
limited 123 characters constraint



I have been executing this from a command line, I wanted to get this
working on the command line before putting it into CL using variables
and concatenations etc.



Anybody know how I can do this?

STRPCCMD PCCMD(' "\\192.168.9.999\EFILE\Rock ^& Roll.PDF" ')



Thanks



John



John






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.