473,413 Members | 2,053 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

How to change directory on File Search

dfound
52
Hi, Iam trying to search files in an entire drivebut I can't get the thing right.Iam using TurboC++. Now, I tried findfirst(),findnext() but it only shows files in current directory.Then I used chdir() command to change directory but the problem is I can't find an effective way to change directories.Please help me.......... :-)
Feb 6 '07 #1
5 4152
macklin01
145 100+
Hmm,

In part, I think you need to interact with the operating system to get that kind of information. In windows, that means win32 calls. TurboC++ may have specific functions to help with that, but because it's not standard C++, I can't be of much help to you on that end. However, I'd recommend digging around MS's site for win32 API calls to get directory listings.

Good luck -- Paul
Feb 7 '07 #2
dfound
52
Thanks......
Feb 7 '07 #3
AdrianH
1,251 Expert 1GB
Hi, Iam trying to search files in an entire drivebut I can't get the thing right.Iam using TurboC++. Now, I tried findfirst(),findnext() but it only shows files in current directory.Then I used chdir() command to change directory but the problem is I can't find an effective way to change directories.Please help me.......... :-)
Hmm, I'mn not familiar with these functions, but assuming that these functions are like FindFirstFile() & FindNextFile(), why not try using chdir() and passing the directory name into findfirst().

If these are not similar, you may need to switch over to use FindFirstFile() FindNextFile() instead.


Adian
Feb 7 '07 #4
dfound
52
Hmm, I'mn not familiar with these functions, but assuming that these functions are like FindFirstFile() & FindNextFile(), why not try using chdir() and passing the directory name into findfirst().

If these are not similar, you may need to switch over to use FindFirstFile() FindNextFile() instead.


Adian
Can You please illustrate with an example of this function
Feb 8 '07 #5
AdrianH
1,251 Expert 1GB
Can You please illustrate with an example of this function
Yeah, see the MSDN documentation here: http://msdn2.microsoft.com/en-us/library/aa364418.aspx

Hope this helps.


Adrian
Feb 8 '07 #6

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

Similar topics

7
by: Hostos | last post by:
Hello All, Please advice...I would like to do this in php, but I am open to suggestions I am going to place about 6 gigs of jpeg pictures on a web server. And. I want to allow a user to go...
2
by: Victor Lokhmatov | last post by:
Hello Everyone, My company has asked me to put a company directory on our intranet site and I'm trying to use php to extract the users from our active directory server. I've got everything...
5
by: sling blade | last post by:
I have developled my first major app and i am trying to deploy it in to a host server for publication. However the app tries to use the physical path used during development. Is the path...
3
by: Chris Mellon | last post by:
This appears to be a change in behavior from Python 2.4 to Python 2.5, which I can't find documented anywhere. It may be windows only, or related to Windows behavior. In 2.4, the current...
2
by: Shelly | last post by:
When I upload pictures I put them into a directory structure such as photos/1000/1/Jon.jpg where 1000 is the account number of the customer and 1 is the agentID of the particular customer...
3
by: duyanning | last post by:
I have written a pyhton script that will process data file in current working directory. My script is in an different directory to data file. When I debug this script using pdb within emacs, emacs...
5
by: Joseph Barillari | last post by:
Hi python-list, I've just started using new-style classes and am a bit confused as to why I can't seem to alter methods with special names (__call__, etc.) of new-style class instances. In other...
65
by: Hongyu | last post by:
Dear all: I am trying to write to a file with full directory name and file name specified (./outdir/mytestout.txt where . is the current directory) in C programming language and under Unix, but...
8
by: Mateusz Viste | last post by:
Hi, I'm not sure if my question is really related to JavaScript, so please excuse me if that's not the case (and maybe you guys would have an idea what's the cause is and where could I ask)... ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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
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
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...

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.