How to create a new folder in %APPDATA% using C++?


I’ve tried to include the IOUtils library and use the CSIDL command, but it isn’t working…

Here is the part of the code that does it:

//——————- Includes ———————–
#include <fmx.h>
#include <IOUtils.hpp>
#pragma hdrstop

#include “Unit1.h”
#include “Unit2.h”
#include “Unit3.h”
//———————- end ————————
//—- On Form Show (bugged event: It doesn’t create the needed folder) —-

void __fastcall TfrmInicio::FormShow(TObject *Sender)
if (TDirectory::Exists(“CSIDL_APPDATA\\Nintersoft\\Ninterfin”)) {
if (FileExists(“CSIDL_APPDATA\\Nintersoft\\Ninterfin\\”)) {
else {

//——————————— end ————————————

I hope you can helpe me…
Thanks a lot XD

Comments are closed.