Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Shell cmd /c

Status
Not open for further replies.

marksnow

Programmer
Oct 30, 2002
39
0
0
AU
Hi

I have some code in my DB that opens up a file using the following code:

Code:
'Opens the file.
stAppName = "cmd /c " & Chr(34) & fileName & Chr(34)
Call Shell(stAppName, vbHide)

Now the above works perfectly well when opening a file on my C:\ drive even if there are spaces in the directory names. However as soon as I change it to a network drive it has issues with the spaces in the directory names.

I think our server is running linux could this be the issue?

Any help would be appreciated.

Mark
 
it could be...

try putting literal character marks before the spaces, off the top of my head, for unix, it's something like:
\\dir\fname/ moreName

but do check that...

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top