473,503 Members | 2,107 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

passing filepath from another file

1 New Member
Hi
I want to avoid hardcoding the filepath in my C program. I want to store the filepath in a variable in a text file. then i have to pass that variable to another file. ex. "$ADE_VIEW_ROOT/a/b/c/a.txt" . Im executing C files in Linux env.
If anyone knows pls help me.
Nov 11 '08 #1
2 1636
r035198x
13,262 MVP
So what exactly do you need help with here? Have you tried the code and got an error?
Nov 11 '08 #2
donbock
2,426 Recognized Expert Top Contributor
This sort of scheme works for run-time determination of the file path. It won't work at compile-time (for #include). You didn't say which you were trying to achieve.
Nov 11 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

10
2518
by: Rigga | last post by:
Hi, Ok first please bear with me as I am a total Python n00b.. Can anyone explain why this does not like me using % FileLoc in the os.system call??? #!/usr/bin/python import sys import os
0
4410
by: gagans | last post by:
Hi My web service has a method which accepts byte array as parameter. <WebMethod()> _ Public Function SendLoan(ByVal data As Byte()) As String Dim filePath As String filePath =...
58
10046
by: jr | last post by:
Sorry for this very dumb question, but I've clearly got a long way to go! Can someone please help me pass an array into a function. Here's a starting point. void TheMainFunc() { // Body of...
9
5658
by: mjakowlew | last post by:
Hi, I'm trying to use some string manipulation from a file's path. filepath='c:\documents\web\zope\file.ext' I need to extract everthing after the last '\' and save it. I've looked around...
6
8382
by: SStory | last post by:
I have an exe and need to pass a filepath which has spaces and would normally be surrounded by " " if done from the Window Start -- Run dialog... How can I get the quotes around the strings I...
0
1197
by: ohmp05 | last post by:
Hi all, I am new to deployment of application. If any one please help me on it , that will be great. During the installation of project, Installer will execute an utility( It will display...
12
4521
by: snow | last post by:
Hi All, I noticed if file path has a white space, for example "C:\my document \test.txt", the function File.Exists(filePath) always return false in release mode. How could I make this function...
3
3441
by: NobodyImportant | last post by:
Hello everyone! I admit up front that I am new at this and have very little knowledge of JavaScript, but we have an asp web form that allows for the manipulation of letters our company regularly...
1
3837
by: ateale | last post by:
Hi Guys, Can anyone advise on how to get get a file's filepath via a form? I am working on using a form to allow a user to select a file, then the app uses FTP to transfer the file to the...
0
7093
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
7287
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,...
1
7011
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7468
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
5596
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
4689
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
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
747
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
401
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.