473,471 Members | 1,981 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

filename variables

If in Windows XP I use:

openstring= "test.py >foo.txt"
os.system(openstring)

it works.
But if I use:

file1='foo.txt'
openstring= "test.py >"+file1

It gives an IOError about no such file or directory as
\\mydidr\\foo.txt

What does it mean ?

Mar 2 '06 #1
1 1446
cy*****@walla.co.il wrote:
If in Windows XP I use:

openstring= "test.py >foo.txt"
os.system(openstring)

it works.
But if I use:

file1='foo.txt'
openstring= "test.py >"+file1

It gives an IOError about no such file or directory as
\\mydidr\\foo.txt

What does it mean ?


That you obviously didn't give us the actual (non-) working code, but
something you believe is essential. Because

file1='foo.txt'
openstring= "test.py >"+file1

certainly doesn't give that error.

Post a running, self contained examplpe, and we might be able to help you.

Diez

Mar 2 '06 #2

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

Similar topics

3
by: Shawn Wilson | last post by:
Hi, I've created a PHP file called filename.jpg. It outputs a JPG. I've set up a .htaccess file to force the filetype to PHP. The file is displayed in a page on a browser. I cannot get the...
7
by: deko | last post by:
I need to allow users to download files from a directory that is not publicly accessible. To do this, I use a download script: header("Content-Type: application/octet-stream");...
2
by: Michael | last post by:
Hi. I am trying to create a database based on variables from xp_regread. Somehow I can´t pass @dBDir as FILENAME. I get the following error-message : Server: Msg 170, Level 15, State 1, Line...
10
by: sam | last post by:
Hi, Can anyone tell me how to print a file name from ifstream? the following cout code does not print the filename I created with ifstream preivous: ifstream is; is.open ("text.txt");
5
by: mgershma | last post by:
Hi. Does anybody know how can JavaScript get the filename of the file it's located in? For example, file 'mike.js' contains several functions and variables. I would like to set the variable...
2
by: Rob Cowie | last post by:
Hi, Given a string representing the path to a file, what is the best way to get at the filename? Does the OS module provide a function to parse the path? or is it acceptable to split the string...
2
by: Stefan Mueller | last post by:
I'd like to get the filename of a called PHP script. E.g. if you call http://www.test.com/subdir/start.php I'd like to get within the PHP script 'start.php' the name 'start.php'. I've several...
2
by: Jabba | last post by:
I am ripping my hair out here trying to do something on a SQL Server 2000 box using TSQL that is a breeze in SQL 2005 but I can't make it work. I am trying to do this ... VERSION 1 SET...
2
by: sugapablo | last post by:
I have a server where two different users are each running a different web application. I installed SugarCRM for one, and Info@Hand (built from SugarCRM) for the other. Both are trying to save...
6
by: phpnewbie26 | last post by:
I believe this is a simple problem but I'm not able to figure it out. I have a file that has a filename on each line. I read through this file setting the string to a variable. Then I am trying to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.