473,503 Members | 10,660 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can we find the full path to a directory?

1 New Member
Hi,

I have a piece of code which finds the symbolic links in a directory structure and then use the function readlink() to get the actual path of symbolic link.

e.g.: i get symbolic link /home/software/myproject/bin which points to /home/software/myproject/bin-1.0

Now there are 2 problems, readlink() returns me either the full path as metioned (/home/software/myproject/bin-1.0) or it just gives me back bin-1.0 (link could be created only on folder bin-1.0 using command prompt).

My problem is that i want always the full path. Please let me know how can i find the full path after readlink() gives me the directory name only.

Is there a way i can find the full path from just directory name?

Regards,
Jay
Jun 24 '10 #1
0 1186

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

Similar topics

3
12364
by: Xah Lee | last post by:
Split File Fullpath Into Parts Xah Lee, 20051016 Often, we are given a file fullpath and we need to split it into the directory name and file name. The file name is often split into a core...
1
4595
by: Raquel | last post by:
Ok, so these are the two pieces of information regarding the location of archived logs during a rollforward recovery in a recoverable database: 1. OVERFLOWLOGPATH configuration parameter can...
3
25641
by: PHaroZ | last post by:
Hi, I want to retrieve the complete full path to the directory of my current page but i don't find how to do that. For example i want : D:\myWebSite\firstDotNetWebApp\dir1\ I tried...
3
1531
by: kd | last post by:
Hi All, Given a full path name of a file, is there a command to extract the directory path (without the file name)? Thanks. kd
7
5059
by: gmax2006 | last post by:
Hi, I use RedHat linux. How can I find where exactly the current python script is running? I use this code: #test.py import os,sys
7
2868
by: Mike OKC | last post by:
The Directory.GetFiles method will bring back the file name including the path. I just want the file name, not the path. For Each strFile In Directory.GetFiles(strLocalPath)...
11
8247
by: rh00667 | last post by:
hi all, i'm confused now. how i can get the full path of an application? if myapp is in a directory which belongs to PATH, argv gives me the first token of cmd line, and not the real path of...
27
2033
by: kvnsmnsn | last post by:
I've written a piece of code that interfaces with Postgres. It needs to write a Postgres table to disk, which it does with the <COPYcom- mand. That command requires the absolute file name of the...
4
3014
by: somank.sharma | last post by:
I am running an exe created in C. I need the full path (absolute path) of this exe. In the first argument of main, I am getting the exe name. How can I get the full path for this exe.
4
2819
by: Michel Rouzic | last post by:
I made a program that accepts as parameters an input file name that we'll call file1, and an output file name that we'll call file2, and opens on its own a configuration file called file3. My...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7095
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
7294
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
7361
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
5602
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,...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
3183
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...
1
749
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
403
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.