473,385 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

function popen and spaces in the path or file name

Sorry , corrections to my script

Have a problem with spaces in the function popen
Next example works fine:
...
$drive="c:";
$path="";
$file="\\myfile.exe"">";
$call = $drive.$path.$file;
pclose(popen('start /b '.$call.'', 'r'));

.....
Using "Program Files" in the path name
$path=" \\Program Files"; (error: "c:\Program ... " not found)
or
$path=" \\Program%20Files"; (error: "c:\Program%20Files ... " not found)

thus this will not work!!!!!!!!

Please help me
Apr 24 '06 #1
2 6053
freak wrote:
Sorry , corrections to my script

Have a problem with spaces in the function popen
Next example works fine:
...
$drive="c:";
$path="";
$file="\\myfile.exe"">";
$call = $drive.$path.$file;
pclose(popen('start /b '.$call.'', 'r'));

....
Using "Program Files" in the path name
$path=" \\Program Files"; (error: "c:\Program ... " not found)
or
$path=" \\Program%20Files"; (error: "c:\Program%20Files ... " not found)

thus this will not work!!!!!!!!

Please help me


Hi,

Did you try escaping the space, just like you escape the \?
$path=" \\Program\ Files";
(not tested)

Regards,
Erwin Moller
Apr 24 '06 #2

"Erwin Moller"
<si******************************************@spam yourself.com> schreef in
bericht news:44***********************@news.xs4all.nl...
freak wrote:
Sorry , corrections to my script

Have a problem with spaces in the function popen
Next example works fine:
...
$drive="c:";
$path="";
$file="\\myfile.exe"">";
$call = $drive.$path.$file;
pclose(popen('start /b '.$call.'', 'r'));

....
Using "Program Files" in the path name
$path=" \\Program Files"; (error: "c:\Program ... " not found)
or
$path=" \\Program%20Files"; (error: "c:\Program%20Files ... " not found)

thus this will not work!!!!!!!!

Please help me


Hi,

Did you try escaping the space, just like you escape the \?
$path=" \\Program\ Files";
(not tested)

Regards,
Erwin Moller


Yes I have tested it and no solution!
Apr 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: hokiegal99 | last post by:
This script works as I expect, except for the last section. I want the last section to actually remove all spaces from the front and/or end of filenames. For example, a file that was named " test ...
9
by: Bryan | last post by:
i have a batch file that contains these two lines: -- args.bat echo %1 echo %2 when i run args.bat from the command line it works correctly... notice that abc has quotes in the first...
22
by: rtilley | last post by:
# Spaces are present before and after the XXX filename = ' XXX ' new_filename = filename.strip() if new_filename != filename: print filename Macs allow these spaces in file and folder...
0
by: freak | last post by:
Hi, Have a problem with spaces in the function popen Next example works fine: .... $drive="c:"; $path=""; $file=" \\myfile.exe">"; $call = $drive.$path.$file;
8
by: Mike | last post by:
Am trying to open a Microsoft Word .doc file using Access 2000 with Shell function (on Windows XP Operating system) Here is the code : Shell "C:\Program Files\Microsoft...
2
by: Ken Brubaker | last post by:
Does the xsd.exe command line support paths with spaces? For example the xsd.exe /o: option specifies the output file name. How can I specify an output file path that has a space? I'v tried...
2
by: hubritic | last post by:
I am trying to set off commands on Windows 2003 from python. Specifically, I am trying to use diskpart with a script file (pointed to with path). cmd = p = Popen(cmd, shell=True) The script...
3
by: Jesse | last post by:
Hi all, I have a problem using wget and Popen. I hope someone can help. -- Problem -- I want to use the command: wget -nv -O "dir/cpan.txt" "http://search.cpan.org" and capture all it's...
12
by: Eric_Dexter | last post by:
I am trying to modify a programming example and I am coming up with two problems... first is that I can't seem to pass along the arguments to the external command (I have been able to do that with...
3
by: evenlater | last post by:
I've implemented Bob Larson's frontend auto-updater which runs a batch file that deletes an existing copy of my .accde and then replaces it with a copy of the most recent .accde file. When I run...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.