Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » FileSel&FileList, Path » FindFile (how this work in Local network?)
FindFile [message #59940] Mon, 05 June 2023 21:23 Go to next message
BetoValle is currently offline  BetoValle
Messages: 203
Registered: September 2020
Location: Brasil Valinhos SP
Experienced Member
Hi,

I could not succeed in local network use by testing an existing directory. Is something wrong?

    String s="\\2019-Dell\\temp";
    FindFile f(s);
    Cout() << "resultado=" << f.IsFolder() << EOL;
    Cout() << "resultado=" << f.IsDirectory() << EOL;
    Cout() << "resultado=" << DirectoryExists(s) << EOL;


Thanks!
Re: FindFile [message #59941 is a reply to message #59940] Mon, 05 June 2023 22:07 Go to previous messageGo to next message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Hi,

How about:
 String s="\\\\2019-Dell\\temp";

??

Best regards,

Tom
Re: FindFile [message #59942 is a reply to message #59941] Tue, 06 June 2023 16:27 Go to previous messageGo to next message
BetoValle is currently offline  BetoValle
Messages: 203
Registered: September 2020
Location: Brasil Valinhos SP
Experienced Member
Hi,

Add + 2 slashes with function DirectoryExists work!

But, with the class FindFile not work! do you know why?

a while ago I posted a post where there was no feedback on problems involving (active) local network that do not display shared folders as per the link below. It must be related to this issue of the FindFile class not working, as the example I posted
https:// www.ultimatepp.org/forums/index.php?t=msg&th=11975&s tart=0&)

Thanks!
Re: FindFile [message #59943 is a reply to message #59942] Tue, 06 June 2023 17:15 Go to previous messageGo to next message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Hi,

I think FindFile is intended for looking up multiple files with desired patterns e.g. "\\\\2019-Dell\\temp\\*.*". If you just wish to make sure the share 'temp' on server '2019-Dell' exists, you should probably use DirectoryExists("\\\\2019-Dell\\temp").

Best regards,

Tom
Re: FindFile [message #59945 is a reply to message #59940] Tue, 06 June 2023 18:23 Go to previous message
BetoValle is currently offline  BetoValle
Messages: 203
Registered: September 2020
Location: Brasil Valinhos SP
Experienced Member
ok, it works as a wildcard! Looking at the documentation, it also works with "*" or "? Interestingly, the way to search a folder on your machine, differs from searching on the local network.

In the documentation they could point out that so on the local network when searching for a folder (and multiple files) the developer must use wildcards, which is not necessary on the Local machine!

Tks!
Previous Topic: BUG Access violation when closing FileSel
Next Topic: FileSel::ExecuteSelectDir issue
Goto Forum:
  


Current Time: Thu Apr 25 14:44:07 CEST 2024

Total time taken to generate the page: 0.03133 seconds