path « Development « C File Q&A

Home
C File Q&A
1.array
2.binary
3.delete
4.Development
5.directory
6.fgets
7.fopen
8.fprintf
9.fscanf
10.fwrite
11.header
12.include
13.input
14.LINE
15.linux
16.open
17.output
18.pointer
19.read
20.size
21.string
22.struct
23.Text
24.windows
25.write
C File Q&A » Development » path 

1. Getting absolute path of a file    stackoverflow.com

How can I convert a relative path to an absolute path in C on Unix? Is there a convenient system function for this? On Windows there is a GetFullPathName function that does the ...

2. Retrieving the path from a file descriptor or FILE *?    stackoverflow.com

Is there a way to retrieve path information from a file descriptor or FILE pointer? I'm aware that this data may not always be relevant/useful for case where the file descriptor ...

3. How do you find the fully qualified path name of a file?    stackoverflow.com

On Windows, you can go to "Run," type in "cmd," press enter, and start up "C:\Windows\system32\cmd.exe" rather easily. The same is true for "python" or "pythonw" (though nothing pops up in ...

4. Why would W32 Emacs insert "/Application Data/Application Data/" into a filepath starting with ~/ when I use C-x C-f?    stackoverflow.com

I just installed Emacs Speaks Statistics, which is when this error started showing up. Uninstalling hasn't fixed it. When I use C-x C-f, I can navigate normally, but when I actually press ...

5. How to get full path of a file just by giving the filename in C?    stackoverflow.com

Suppose I have a file path as C:\Sample\example.txt. how can full path of the file be retrieved (the file can be in any directory) just by giving the filename i.e., example.txt ...

6. C Shell Scripting - Remove PathName up to FileName    stackoverflow.com

So the final part I'm missing in my assignment is a way to print ONLY the file names (rather than ./usr/etc/folder/directory/file.pdf, I want to print file.pdf) but I can't remember how ...

7. Getting the inode number of an unopen file from path    stackoverflow.com

Is there a way I could get the inode number of a file which has not yet been opened. I would like to do this from inside a c function Regards, Lipika

8. Changing the File name on local path using C File Handling?    stackoverflow.com

FILE *fp;
fp=fopen("c:\\test.txt", "r");
int fgetc (FILE *fp);
int fputc( int c, FILE *fp );
Is there any way to change a filename that already exist in computer? If yes, then how should i reference the ...

9. How important is file path length?    stackoverflow.com

I'm working on crossplatform library which will be used to file manipulations (create, rename, delete, ...) on optical media. So I have questions related to path handling.

  1. Currently I have no ...

12. Need help with relative file path    bytes.com

Hey all, I'm writing a c++ program that needs to read a file. I'm trying to read a file that is in the same directory as the executable. Everything works fine if I execute the program while in the program's directory. What I need to do is read that file regardless of where (cwd) I execute the program from, without hardcoding ...

15. Path of file :filename variable    bytes.com

hi ilikepython, im not getting this c_str()function im not good at this pointer things can u tell me a little more abt y r u implying this here.. if possible? by the way cstring is not working with my c++ compiler as it is for visual c++ i hope!!! That function turns a string object into a char array. That is ...

16. File path problems    cboard.cprogramming.com

17. filepath help please,    cboard.cprogramming.com

Hello, i am writing a program and i want to read from a file and create another and write to it, i already have most of it figured out but my problem is the file path, i cant create it to C:\ as it gives issues so i create them at C:\Users\[my username]. how can i get the program to get ...

18. Save file to a specific path    cboard.cprogramming.com

I need to create , open , write and save soenthing to a text file in a specific folder. At the moment i am doing this : ------------------------ FILE *OutFile = fopen("Test.txt","w"); fprintf(OutFile,"This is a test to open,write and save something to a sig file"); fclose(OutFile); ------------------------------------------- This opens and saves the txt file in the project folder. I need it ...

19. get path of filename    cboard.cprogramming.com

20. Formatting file path with spaces    cboard.cprogramming.com

21. How to use files in a path?    cboard.cprogramming.com

22. Recognizing a Sequence of Characters in a File Path    cboard.cprogramming.com

Hey, every one. I have a (hopefully) quick question here, and I'd appreciate any help you can offer. I really need to be pointed in the right direction here. Hopefully I can explain this clearly: I'm trying to write a program where you can insert the path of a file (C:\Program Files\CProgrammingRocks.txt as an example), and it'll look for a certain ...

23. UNIX file path format    cboard.cprogramming.com

#include #include #include #include #include int main ( ) { struct stat sb; if ( stat("c:/temp/xfiles.txt", &sb ) == 0 ) { printf("DOS Forward slash size = %lu\n", sb.st_size ); } if ( stat("c:\\temp\\xfiles.txt", &sb ) == 0 ) { printf("DOS Backward slash size = %lu\n", sb.st_size ); } if ( stat("/cygdrive/c/temp/xfiles.txt", &sb ) == 0 ...

24. Path of file relative to program    cboard.cprogramming.com

As been pointed out a relative path is always relative to the current working directory and not to the location of the executable. So if you store your resources relative to the location of the executable you have to have a means to find out where your executable is stored. One way to get that location is to check the commandline ...

25. Hirarchical path file copying    cboard.cprogramming.com

26. Finding the path of a file    cboard.cprogramming.com

27. File Path Setting    cboard.cprogramming.com

ok.....from the standard escape table i see.... \n -----new line charater dir\no.txt" ----so creating trouble.... and also in my above post c:\\fold\\vol\\ file.txt there was \f-----> form feed \v-----> vertical tab these are also in the escape sequence table. so effectively if i really need a sigle slash( which is like in DOS) i have to use one more slash(to override?) ...

28. user defined path for FILENAME    cboard.cprogramming.com

When I need to use a data file I'll put it in the preprocessor directives: #include FILENAME "c:\datafile.dat" Is there a way of assigning FILENAME to some user defined file name? In other words, I would like to: printf ("Enter the path of your data file =>"); and somehow associate this entry with FILENAME. I've tried playing around with some string ...

29. Finding the path of an .exe file    cboard.cprogramming.com

I would like to know how to find out what the directory path of a running program is. The intention being, that if I distrubute a small zipped program to some friends with a preset file and folder structure for the program to save files too, how can I get the program to find out where it has been unzipped too ...

31. C# Error: The specified path, file name, or both are too long    forums.devshed.com

public string scanFile(string filePath) { try { /****** ERROR IS THROWN LINE BELOW ******/ TextReader reader = new StreamReader(filePath); string line = ""; while ((line = reader.ReadLine()) != null) { .....do lots of stuff } if (yada yada) { return report; } else { return null; } } catch (Exception e) { throw e; } }

32. FileNotFoundException despite file path being correct.    forums.devshed.com

Hi all, thanks for your input. these forums are invaluable for newbies like me just starting out in the programming world. I managed to solved the problem which was so simple it's almost embarrassing. I had the filename as actors.txt.txt so obviously that wouldn't work. when changed to actors.txt it worked fine. still don't have any idea what the while(true) is ...

33. File path    forums.devshed.com

34. File Name From Path...    forums.devshed.com

35. How to get full path to a file?    forums.devshed.com

I have a linux C program which takes as input a filename, the filename can include the full path to it or it can be relative from the current directory where the program is being run. What I need to do is if given a relative path, I need to turn it into a full path and store that string for ...

36. file path    forums.devshed.com

hi, i'm using static path in my c application for the accessing of batch file ,but i want to use the relavent path of the file . how can i do that ? char filePath[]= "H:\\project\\data\\STOCK786.dat"; /* path of the DAT File */ path of this c file= "H:\\project\\source\\STOCK786.dat"; so i want to access that "dat" file in this c file ...

37. file path problem    forums.devshed.com

im trying to make a program that i can choose the an xml i want to open and then convert it from acsii to hex then write that to a file I havent gotten to the hex part just yet I am still working on the file selecting part. help on any of it would be great im new to this ...

38. filepath & filestream    forums.devshed.com

39. Do I need to set paths to files?    forums.devshed.com

What I need to know is if in the following code I need to set a path to files, i.e. /path/to/users.dat. I am a self taught programmer and mainly deal with PHP and CFML with MySQL and not C++. This is designed for a unix based system and designed to compile using g++. It updates the backend to an online game ...

41. Obtain file path name on mouse click    codeproject.com

42. System.IO.File.Exists - what if network path and not C:\    bytes.com

"Ronald S. Cook" > "PS" "Ronald S. Cook" news:%23XHe%23KeYHHA.984@TK2MSFTNGP04.phx.gbl.. . >>I'm trying to see if a file exists on a server. I have the below code >>which doesn't seem to work. Must I necessarily have a mapped drive to >>that the path ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.