this is the python code

os.popen("explorer.exe " + os.getcwd())

would jsut need a conversion to c or c++

Recommended Answers

All 2 Replies

you will have to do that in several lines.
popen()
getcwd()

#include <stdio.h>

int main()
{
    char path[255] = {0};
    char command[320] = {0};
    strcpy(path, getcwd());
    strcpy(command, "explorer.exe ");
    strcat(command, path);
    
    FILE* fp = popen( command, "r" );
    // now read from the file pointer just as you would from any other file
}

thank you vvery much :)

might i ask umm what program would you use to compile

thanks
-Nick

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.