Adblock breaks this site

Temporary File Cleaner program (C++)

Discussion in 'Programming General' started by PdIZZY, Feb 5, 2008.

  1. PdIZZY

    PdIZZY Guest

    Referrals:
    0
    Temporary File Cleaner program (C++)

    what up y'all...i have just joined this forum today(feb 5th 08) woohoo...lol

    Neway I have been wanting to create a program to clear all the temporary files(temporary Internet Files, Temp, Cookies, History etc) folders for all users on a windows machine (95 to vista or at least xp)....i do know there are programs out there that accomplish this...but i wanted to create mine(at least give it a shot).

    C++ is the language i am most familiar with....Hope some1 can help

    PdIZZY
     
  2. PdIZZY

    PdIZZY Guest

    Referrals:
    0
    Temporary File Cleaner program (C++)

    so 15 views and no response = either its too complicated, or no1 here has input....
     
  3. Govind

    Govind The One Musketeer
    Mudkips Highly Respected Retired Administrator

    Joined:
    Apr 22, 2005
    Posts:
    7,825
    Referrals:
    13
    Sythe Gold:
    23
    Prove it! Trole Tier 1 Prizebox Tortoise Penis Le Monkey UWotM8? Wait, do you not have an Archer rank? Potamus
    Temporary File Cleaner program (C++)

    The programming forums aren't really that active. I could help you out later though.
     
  4. Faskist

    Faskist Tuxhead
    Banned

    Joined:
    Apr 25, 2005
    Posts:
    1,869
    Referrals:
    0
    Sythe Gold:
    0
    Temporary File Cleaner program (C++)

    This would be a one-liner in bash, and you could set it up to run when you like as a cronjob.
     
  5. PdIZZY

    PdIZZY Guest

    Referrals:
    0
    Temporary File Cleaner program (C++)

    ya i could tell....look forward for some ideas from u SMR....Thanks!
    One thing i did start was to write a batch script....but the problem is that the person running that script will need to have WMI installed on computer....hence crashing the script if they dont...so i am no longer doing it that way....and want to write in some way where they a person doesnt have to install anything and the program runs and does its thing...
     
  6. PdIZZY

    PdIZZY Guest

    Referrals:
    0
    Temporary File Cleaner program (C++)

    unfortunately i don't have any experience on Unix/linux shell programming....
     
  7. Faskist

    Faskist Tuxhead
    Banned

    Joined:
    Apr 25, 2005
    Posts:
    1,869
    Referrals:
    0
    Sythe Gold:
    0
    Temporary File Cleaner program (C++)

    rm -rf /directory/of/temporary/files

    I don't have any experience with cron, but save the above command in a shell script and have it execute every so often.
     
  8. Olan14

    Olan14 Forum Addict

    Joined:
    Jan 26, 2007
    Posts:
    581
    Referrals:
    0
    Sythe Gold:
    0
    Temporary File Cleaner program (C++)

    getenv("TMP"), getenv("TEMP"), getenv("TEMPDIR"), UNIX "/tmp", stdlib's system(char *), and stdio's remove(char *).
     
  9. Swan

    Swan When They Cry...
    Retired Global Moderator

    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner
    Temporary File Cleaner program (C++)

    Windows offers a utility to do this for you anyway. Right click on the C:\ drive, click Properties and click Disk Cleanup. Strange how the "properties" of the C:\ drive are used for more than just properties.

    Linux, all you really need to do is clear the /tmp/ directory. simply means deleting the contents of the folder using rm -r.
     
  10. enjoi888

    enjoi888 Forum Addict
    Banned

    Joined:
    Feb 28, 2007
    Posts:
    323
    Referrals:
    1
    Sythe Gold:
    0
    Temporary File Cleaner program (C++)

    looking for a program that will do it automatically wen u visit certain sites
     
  11. zstars

    zstars Guest

    Referrals:
    1
    Temporary File Cleaner program (C++)

    You might want to use the boost.filesystem library, with it the task should be somewhat trivial, provided you know which folders to delete. For finding the actual user directory, there is a windows API by the way.
     
  12. |0|

    |0| Apprentice
    $25 USD Donor New

    Joined:
    Sep 21, 2007
    Posts:
    818
    Referrals:
    2
    Sythe Gold:
    2
    Vouch Thread:
    Click Here
    Two Factor Authentication User Gohan has AIDS
    Temporary File Cleaner program (C++)

    This would be a good and usefull program..
     
< NEED autoclicker code! | IRC like chat - parsing data? >


 
 
Adblock breaks this site