Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 2nd, 2005, 9:44 PM   #11
Floppie
Newbie
 
Join Date: Feb 2005
Posts: 18
Rep Power: 0 Floppie is on a distinguished road
The server is written partially in Visual Basic, partially in C++.

While I could look into changing the temp file names to be unique then deleting them afterward, I would much rather just learn to do it the right way. It'd do me some good for the future to do so.
Floppie is offline   Reply With Quote
Old Apr 3rd, 2005, 12:08 AM   #12
Floppie
Newbie
 
Join Date: Feb 2005
Posts: 18
Rep Power: 0 Floppie is on a distinguished road
Quote:
Originally Posted by some1
FindFirstFile() and FindNextFile() work perfectly thanks
What library are these in and how are they used? I may try them.
Floppie is offline   Reply With Quote
Old Apr 3rd, 2005, 6:56 AM   #13
lepricaun
Hobbyist Programmer
 
lepricaun's Avatar
 
Join Date: Aug 2004
Location: The Netherlands
Posts: 111
Rep Power: 5 lepricaun is on a distinguished road
Quote:
What library are these in and how are they used? I may try them
ever heared of google?

http://msdn.microsoft.com/library/de...deletefile.asp

result:
Quote:
Client Requires Windows XP, Windows 2000 Professional, Windows NT Workstation, Windows Me, Windows 98, or Windows 95.
Server Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server.
Header

Declared in Winbase.h; include Windows.h.
Library

Link to Kernel32.lib.
DLL Requires Kernel32.dll.
Unicode

Implemented as DeleteFileW (Unicode) and DeleteFileA (ANSI). Note that Unicode support on Windows Me/98/95 requires Microsoft Layer for Unicode.
__________________
http://www.white-scorpion.nl
lepricaun is offline   Reply With Quote
Old Apr 3rd, 2005, 7:39 PM   #14
Donald Ferrone
Newbie
 
Donald Ferrone's Avatar
 
Join Date: Mar 2005
Posts: 19
Rep Power: 0 Donald Ferrone is on a distinguished road
Send a message via MSN to Donald Ferrone
go to the shell and tpye ls or dir
Donald Ferrone is offline   Reply With Quote
Old May 28th, 2005, 7:58 PM   #15
bronzefury
Newbie
 
Join Date: May 2005
Posts: 2
Rep Power: 0 bronzefury is on a distinguished road
FindFirstFile finds extra files

Hi,

I was wondering. Has anyone used FindFirstFile where FindFirstFile returns extra files that aren't part of the search string?

I wrote a C/C++ console program that prompts for a search string and a path.

I enter "*bc*" as the search string without the quotes then enter the path as "C:\".

FindFirstFile returns many files that contain the letters "bc" but also returns 5 or 6 files that no letters of "bc" in them.

I've been searching through the net to see if anyone has encountered this problem but to no avail.

bronzefury
bronzefury is offline   Reply With Quote
Old May 29th, 2005, 4:45 AM   #16
lepricaun
Hobbyist Programmer
 
lepricaun's Avatar
 
Join Date: Aug 2004
Location: The Netherlands
Posts: 111
Rep Power: 5 lepricaun is on a distinguished road
Could you post the source or at least that part of the source that creates your problem?
__________________
http://www.white-scorpion.nl
lepricaun is offline   Reply With Quote
Old May 29th, 2005, 9:45 AM   #17
bronzefury
Newbie
 
Join Date: May 2005
Posts: 2
Rep Power: 0 bronzefury is on a distinguished road
Hi,

The program is a console application. When the application is run, it will prompt

Enter search string:


To cause this problem, I enter bc

Then, the application will ask you to enter a search path, like so..

Enter search path:

Enter c:\ . The backslash is needed.

The program will pass c:\*bc* to the FindFirstFile function call. It appends the asterisks prior to calling FindFirstFile.

To help you see the output, a file called findfile.dat is produced. It contains the list of files found. I tried my best to have it indicate the incorrect files by prefixing incorrect files with "BAD MATCH ..." Please disregard the output where it prints BAD MATCH for files found with uppercase BC, bC, or Bc.

I hope what I typed makes sense.

I've attached the source code. Just rename file by removing the ".txt" extension.


Thanks,
Raul
Attached Files
File Type: txt main.cpp.txt (1.1 KB, 18 views)
File Type: txt FileFinder.cpp.txt (8.9 KB, 18 views)
File Type: txt FileFinder.hpp.txt (1.3 KB, 16 views)
bronzefury is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:14 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC