scandir() + windows equivalent


 
Thread Tools Search this Thread
Top Forums Programming scandir() + windows equivalent
# 1  
Old 07-16-2008
scandir() + windows equivalent

Currently, Im trying to redesign some Unix-based C code to work on the Windows operating system and one problem I ran into when compiling was that the compiler failed to recognise scandir() (from my original Linux code)

Im aware that scandir() is a Unix-based function, so is there an equivalent function for Windows or a unique Windows-based header file that I require ?

My Windows compiling environment is Borland C++ 5.5

many thanks
James
# 2  
Old 07-16-2008
Use FindFirstFile and FindNextFile. They are less powerful than scandir, but I think it might be the best match to what you are trying to achieve,
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

UNIX equivalent of windows terminal server options?

I want to replace Windows terminal server mostly due to cost reasons license cost for 2100 users goes out of roof. The end-user is all windows but I want a jump server that is UNIX based , I have some experience with VNC but I don't want options exists in UNIX to run a terminal services for 2100... (10 Replies)
Discussion started by: lazerz
10 Replies

2. Programming

scandir() and threads

I couldn't find anywhere informations about it. Is scandir() thread-safe? (4 Replies)
Discussion started by: dawwin
4 Replies

3. UNIX for Advanced & Expert Users

scandir help

Hi everyone; I am trying to compile and execute a test program I wrote that calls scandir and it seems to not like my prototype. The Documentation on SUN for this function is clear, but I am missed something..... and I can't figure it out; I am using cc -gv -osaveas saveas.c on Sun... (1 Reply)
Discussion started by: dhelie
1 Replies

4. Linux

Unix Equivalent Windows Variable

Hi, I've set my Unix User Profile Variables as follows.. export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 I want to set the same codepages in my Windows Vista Environment.. How can i do that..? Whether the variable names remain same ..? Please help Regards, Vikram... (1 Reply)
Discussion started by: vickramshetty
1 Replies

5. Shell Programming and Scripting

Windows command shell equivalent in Unix

In Windows we use cmd.exe \c as the command SHell What is its equivalent in UNIX ? Thanx for all your help. (10 Replies)
Discussion started by: simonsimon
10 Replies

6. Programming

scandir() for Solaris

I'd like to use scandir() on solaris, but it doesn't find sys/dir.h What do you think I should do? thanks (2 Replies)
Discussion started by: nadiamihu
2 Replies

7. Programming

Need help with scandir / stat

I'm writing a file manager program using FC3 and C, and I'm having a problem displaying the stat info of subdirectories. #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <dirent.h> int main() { char *dirname = "mydirectory"; struct dirent **namelist; ... (2 Replies)
Discussion started by: Bertsura
2 Replies

8. Linux

windows startup equivalent in linux

hi all, greetings, please tell me how to start a java GUI program in the startup of the machine. since it invokes a GUI is it possiable to entry the same in /etc/rc2.d/S99userdefinedfiles. thanks in advance ., :-) (1 Reply)
Discussion started by: raguramtgr
1 Replies

9. Programming

unix equivalent for windows APIs..........................

Hi, Is there any unix equivalents available for the folllowing windows function ? FindFirstFile FindNextFile etc..... Or do i have to write an equivalent api?? Can anybody help me to do the same?? thanks in advance Ani (2 Replies)
Discussion started by: ani
2 Replies

10. UNIX for Dummies Questions & Answers

Unix Equivalent of Windows NT Diagnostic (Winmsd) report

Hi Guys, Is there a way I can generate a Diagnostic Report for Unix app server/database server (for sun solaris and aix) similar to the system diagnostic report in Windows NT(winmsd). Basically I am looking for the following details below in a single comprehensive report. If there is no... (2 Replies)
Discussion started by: neer
2 Replies
Login or Register to Ask a Question