Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Shell


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-31-2007, 05:38 PM
Wizarda2z's Avatar
Newbie
 
Join Date: May 2007
Location: UK
Posts: 8
Angry Shell

Is there any way to get around this:-

shell("textedit.exe", "\storage card\program files\test.txt")

It seems that any directory that contains spaces is not valid to the shell command on the PPC or desktop.

I've tried padding the spaces with the '_' but to no avail.

Single name directories work ok eg.

shell("textedit.exe", "\temp\temp\test.txt")

A bit baffled here!
Reply With Quote
  #2 (permalink)  
Old 07-31-2007, 05:47 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

What you want to run is: textedit.exe "\storage card\program files\test.txt"
You need to add the quotes:
Code:
shell("textedit.exe", chr(34) & "\storage card\program files\test.txt" & chr(34))
Reply With Quote
  #3 (permalink)  
Old 07-31-2007, 06:32 PM
Wizarda2z's Avatar
Newbie
 
Join Date: May 2007
Location: UK
Posts: 8
Default

Problem solved. Thanks Erel.
Reply With Quote
  #4 (permalink)  
Old 08-05-2007, 08:56 AM
Wizarda2z's Avatar
Newbie
 
Join Date: May 2007
Location: UK
Posts: 8
Default Shell and Pword

I just thought that I'd mention that when using the shell command to open Pocket word documents, the chr(34) codes should be ommited from the files path otherwise Pword raises an error.

It took me a wile surfing the net to find this out because I couldn't understand what I was doing wrong!

eg shell("pword.exe", "storage card\my documents\mifile.doc")

NOT shell("pword.exe", chr(34) & "storage card\my documents\mifile.doc" & chr(34))

Microsoft's fault I think!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
shell and email BjornF Questions & Help Needed 4 07-03-2008 11:19 AM
Shell command J12345T Questions & Help Needed 2 06-08-2008 10:49 AM
Shell and wait Erel Code Samples & Tips 0 03-26-2008 04:14 PM
using shell() Put Claude Questions & Help Needed 2 12-26-2007 09:41 AM
Shell tvrman Questions & Help Needed 3 07-30-2007 02:20 PM


All times are GMT. The time now is 03:49 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0