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 » Developing U++ » U++ Developers corner » evaluate command line (parse line by line processed command to create backup log)
Re: evaluate command line [message #58691 is a reply to message #58690] Fri, 22 July 2022 22:51 Go to previous messageGo to previous message
BetoValle is currently offline  BetoValle
Messages: 204
Registered: September 2020
Location: Brasil Valinhos SP
Experienced Member
the only way that i found to use "dir" is below
but disadvantage is that the console window opens

   const char* cmd;

    cmd="dir C:\\temp";

    std::shared_ptr<FILE> pipe(popen(cmd, "r"), pclose);

    char buffer[128];

    std::string result = "";

    while (!feof(pipe.get())) {

        if (fgets(buffer, 128, pipe.get()) != NULL)

            result += buffer;

    }

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: log file in Oracle8
Next Topic: Windows 11 toolbar and menu issues
Goto Forum:
  


Current Time: Mon May 12 01:15:49 CEST 2025

Total time taken to generate the page: 0.03088 seconds