DESKTOP CLEANING APPLICATION

From various souces around we get many files on our desktop which are not to be used right then but to be kept for later use.This application is to clean your desktop. It would check the extension of your file and send it to the desired location.Various windows API functions have been used in the coding. The file management functions with their parameters and brief description is as follows:


1.)FindFirstFile function: Searches a directory for a file or subdirectory with a name that matches a specific name (or partial name if wildcards are used).
  SYNTAX: HANDLE WINAPI FindFirstFile (LPCTSTR lpFileName,LPWIN32_FIND_DATA lpFindFileData);
 PARAMETERS:
lpFileName [in]
The directory or path, and the file name. Since we are talking of a particular case we have given the path of our desktop. We have used * with extension of files we want to move.
lpFindFileData [out]
A pointer to the WIN32_FIND_DATA structure that receives information about a found file or directory.

If the function succeeds, the return value is a search handle used in a subsequent call to FindNextFile, and the lpFindFileData parameter contains information about the first file or directory found.
If the function fails or fails to locate files from the search string in the lpFileName parameter, the return value is INVALID_HANDLE_VALUE and the contents of lpFindFileData are indeterminate.




2.)FindNextFile function : 
     Continues a file search from a previous call to the FindFirstFile function.
   SYNTAX:
   BOOL WINAPI FindNextFile(HANDLE hFindFile,LPWIN32_FIND_DATA lpFindFileData);
  PARAMETERS:
hFindFile [in]
The search handle returned by a previous call to the FindFirstFile function.
lpFindFileData [out]
A pointer to the WIN32_FIND_DATA structure that receives information about the found file or subdirectory.
The structure can be used in subsequent calls to FindNextFile to indicate from which file to continue the search.
If the function succeeds, the return value is nonzero and the lpFindFileData parameter contains information about the next file or directory found.
If the function fails, the return value is zero and the contents of lpFindFileData are indeterminate

3.)MoveFile function :
Moves an existing file or a directory, including its children.

SYNTAX:BOOL WINAPI MoveFile(LPCTSTR lpExistingFileName,LPCTSTR lpNewFileName);

PARAMETERS:
lpExistingFileName [in]
The current name of the file or directory on the local computer. The location from where we are moving our file.
lpNewFileName [in]
The new name for the file or directory. The new name must not already exist.The location where we want to move our file.

If the function succeeds, the return value is nonzero.If the function fails, the return value is zero.





Here's the source code::
#include<windows.h>
#include<stdio.h>
#include<conio.h>
void cpp(void);
void mp3();
void jpg();
int main(void)
{

cpp();
mp3();
jpg();
getch();
return 0;
}
void cpp()
{
      HANDLE hwnd;
      WIN32_FIND_DATA a;
      hwnd=FindFirstFile("C:\\users\\neha\\desktop\\*.cpp",&a);
      puts(a.cFileName);
      char from[100]="C:\\users\\neha\\desktop\\";
      char to[100]="E:\\cpp\\";
      strcat(to,a.cFileName);
      strcat(from,a.cFileName);
      MoveFile(from,to);
      while(0!=FindNextFile(hwnd,&a))
      {
                                     puts(a.cFileName);
                                     char from1[100]="C:\\users\\neha\\desktop\\";
                                     char to1[100]="E:\\cpp\\";
                                     strcat(from1,a.cFileName);
                                     strcat(to1,a.cFileName);
                                     MoveFile(from1,to1);
 
    }
}
void mp3()
{
      HANDLE hwnd;
      WIN32_FIND_DATA a;
      hwnd=FindFirstFile("C:\\users\\neha\\desktop\\*.mp3",&a);
       puts(a.cFileName);
      char from[100]="C:\\users\\neha\\desktop\\";
      char to[100]="E:\\selected songs\\";
      strcat(to,a.cFileName);
      strcat(from,a.cFileName);
      MoveFile(from,to);
      while(0!=FindNextFile(hwnd,&a))
      {
                                      puts(a.cFileName);
                                      char from1[100]="C:\\users\\neha\\desktop\\";
                                      char to1[100]="E:\\selected songs\\";
                                      strcat(from1,a.cFileName);
                                      strcat(to1,a.cFileName);
                                      MoveFile(from1,to1);
                                    
}

}
void jpg()
{
      HANDLE hwnd;
      WIN32_FIND_DATA a;
      hwnd=FindFirstFile("C:\\users\\neha\\desktop\\*.jpg",&a);
       puts(a.cFileName);
      char from[100]="C:\\users\\neha\\desktop\\";
      char to[100]="E:\\pictures\\";
      strcat(to,a.cFileName);
      strcat(from,a.cFileName);
      MoveFile(from,to);
      while(0!=FindNextFile(hwnd,&a))
      {
                                      puts(a.cFileName);
                                      char from1[100]="C:\\users\\neha\\desktop\\";
                                      char to1[100]="E:\\pictures\\";
                                      strcat(from1,a.cFileName);
                                      strcat(to1,a.cFileName);
                                      MoveFile(from1,to1);
                                    
}

}


---By:: cyb3R 4ng3ls

posted under |

1 comments:

Unknown said...



🔍🔍Are you Seeking for the Best Legit Professional Hackers online??❓💻💻💻
Congratulations Your search ends right here with us. 🔍🔍🔍🔍

🏅COMPOSITE HACKS is a vibrant squad of dedicated online hackers maintaining the highest standards and unparalleled professionalism in every aspect.
We Are One Of The Leading Hack Teams in The United States🇺🇸🇺🇸 With So many Accolades From The IT Companies🏆🏅
We Can Provide The Following Services Effectively:

✅✅Website hacking 💻,
✅Facebook and social media hacking📲
✅Database hacking, & Blog Cleaning⌨️
✅Phone and Gadget Hacking📲
✅ CREDIT CARD Loading 💳 💳 ( Strictly USA & UK Credit Cards Only)
✅Clearing Of Criminal Records❌
✅Location Tracking
✅ and many More✅

🏅We have a trained team of seasoned professionals under various skillsets when it comes to online hacking services. Our company in fact houses a separate group of specialists who are productively focussed and established authorities in different platforms. They hail from a proven track record and have cracked even the toughest of barriers to intrude and capture or recapture all relevant data needed by our Clients. 📲💻

🏅 COMPOSITE HACKS understands your requirements to hire a professional hacker and can perceive what actually threatens you and risk your business⚔️, relationships or even life👌🏽. We are 100% trusted professional hacking Organization and keep your deal entirely confidential💯. We are aware of the hazards involved. Our team under no circumstances disclose information to any third party❌❌. The core values adhered by our firm is based on trust and faith. Our expert hacking online Organization supports you on time and reply to any query related to the unique services we offer. 💯

🏅COMPOSITE HACKS is available for customer care 24/7, all day and night. We understand that your request might be urgent, so we have a separate team of allocated hackers who interact with our Clients round the clock⏰. You are with the right people so just get started.💯✅

✅CONTACT US TODAY VIA:✅
📲 compositehacks@gmail.com 📲

★We Treat Every Request With Utmost Confidentiality★ 🙌🏽

Post a Comment

Newer Post Older Post Home

Followers

    !!!! LeTs ChAt !!!!

    AddThis

    Share |

    Hack'a'Holic

    Subscribe to hackaholicteam

    Powered by in.groups.yahoo.com

    Blog Archive

    Powered by Blogger.