Software-OK
≡... News | ... Home | ... FAQ | Impressum | Contact | Listed at | Thank you |

  
HOME ► Faq ► FAQ - Windows-CPP-und-C ► ««« »»»

How can I query whether a path is a folder or directory?


Querying whether a path is a folder or directory is quite simple in C ++!

 


BOOL IsThePathFolder(LPCTSTR pfad)
{
if(!pfad)return FALSE;

DWORD dwAttr = GetFileAttributes(pfad);
if (dwAttr != 0xffffffff)
{
if (dwAttr & FILE_ATTRIBUTE_DIRECTORY)
{

return TRUE;

}
}
return FALSE;
}

void main()
{
if(IstDerPfadEinOrdner("C:\Windows"))
printf("The path is a folder ergo directory\n");
else printf("The path is not a folder or directory\n");
}

(Image-1) How can I query whether a path is a folder or directory?
How can I query whether a path is a folder or directory?

-
▲ Back to the top ▲




FAQ 2: Updated on: 16 April 2020 08:05 Windows
Windows-CPP-und-C

How can I query whether my x86 application is currently running on x64?


IsWow64Process abfrage unter x64 MS OS nach ob die exe im WOW64 Modus arbeitet   1. Query whether the x86 application runs under x64 2. Advantages
Windows-CPP-und-C

Trim string in cpp?


With your own trim string in cpp, simply shorten the strings individually ////////////////////////////////////////////////// ////////////////////// // //
Windows-CPP-und-C

Was with error code -1073741701 (0xc000007b)!


The solution is very simple to fix the error code: "was ended with code -1073741701 0xc000007b error message" Mostly there are errors in the * .manifest
Windows-CPP-und-C

RGB Pixel to Negative!


Here is the solution to make an RGB pixel a negative RGB PIXEL BYTE R = 255-R;  BYTE G = 255-G;  BYTE B = 255-B;    Or with gray scaling:    BYTE gray_value
Windows-CPP-und-C

ListView_GetItemImage, ListView_GetISubtemImage!


The solution is very simple to find out in ListView Get Item Image and List View GetI Subtem Image ////////////////////////////////////////////////// //////////////////////
Windows-CPP-und-C

ShellExecuteEx function, search in LPCITEMIDLIST!


The solution is very easy to start with the ShellExecuteEx function, search for File in in LPCITEMIDLIST The provided code defines a function called SearchCmdLPCITEMIDLIST,
Windows-CPP-und-C

Listview set thumbnails size!


You can quickly set the size of the thumbnails in the list view, and there are no restrictions on the size   This example demonstrates using the CreateNewImageList

»»

  My question is not there in the FAQ
Asked questions on this answer:
Keywords: windows, query, whether, path, folder, directory, querying, quite, simple, bool, isthepathfolder, lpctstr, pfad, return, false, dword, dwattr, getfileattributes, Questions, Answers, Software




  

  + Freeware
  + Order on the PC
  + File management
  + Automation
  + Office Tools
  + PC testing tools
  + Decoration and fun
  + Desktop-Clocks
  + Security

  + SoftwareOK Pages
  + Micro Staff
  + Freeware-1
  + Freeware-2
  + Freeware-3
  + FAQ
  + Downloads

  + Top
  + Desktop-OK
  + The Quad Explorer
  + Don't Sleep
  + Win-Scan-2-PDF
  + Quick-Text-Past
  + Print Folder Tree
  + Find Same Images
  + Experience-Index-OK
  + Font-View-OK


  + Freeware
  + NewFileTime
  + DesktopClock3D
  + PointerStick
  + DesktopImages3D
  + WinPing
  + GetPixelColor
  + StressMyPC
  + DesktopSnowOK
  + Delete.On.Reboot
  + PAD-s


Home | Thanks | Contact | Link me | FAQ | Settings | Windows 10 | English-AV | Impressum | Translate | PayPal | PAD-s

 © 2025 by Nenad Hrg softwareok.de • softwareok.com • softwareok.com • softwareok.eu


► Has DesktopOK Save option for correct layout naming at multi-screens? ◄
► Switch Language in Windows-7 (install, change, add)? ◄
► In Windows 11 Microsoft account to local user and back! ◄
► Technical data comparison Nintendo Switch 2 and old Switch? ◄


This website does not store personal data. However, third-party providers are used to display ads,
which are managed by Google and comply with the IAB Transparency and Consent Framework (IAB-TCF).
The CMP ID is 300 and can be individually customized at the bottom of the page.
more Infos & Privacy Policy

....