Jump to content

how to create a script <if folder smaller than (eg 1gb) then delete the folder > ?


Recommended Posts

hi to all i want to make a script which if it finds a folder smaller than eg 1gb or 1.32gb or specific amount of bytes then delete the folder .

i checked the dirremove and the dirgetsize commands but couldn t do it ...

also didn t found it in the foroum ^_^

can some1 help ?

Thx in advance keep on scripting !!!

Link to comment
Share on other sites

hi to all i want to make a script which if it finds a folder smaller than eg 1gb or 1.32gb or specific amount of bytes then delete the folder .

i checked the dirremove and the dirgetsize commands but couldn t do it ...

also didn t found it in the foroum ^_^

can some1 help ?

Thx in advance keep on scripting !!!

You know I wrote the simplistic script for you... then

I read your other topics and noted that this could be "dangerous" for a newby like yourself.

i checked the dirremove and the dirgetsize commands but couldn t do it ...

That is basic stuff to do

Sorry, I cant help

8)

NEWHeader1.png

Link to comment
Share on other sites

$size = DirGetSize($Dir) / 1024 / 1024 / 1024
                     ;Bytes^KB   ^MB   ^GB

This will return size in GB

Edited by LurchMan

Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.

Link to comment
Share on other sites

I read your other topics and noted that this could be "dangerous" for a newby like yourself.

My $0.02 is that AutoIt is dangerous by its very existence. It makes some people believe they can write programs!

WBD

Link to comment
Share on other sites

yeah...thats why i stick with scripts.....

Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.

Link to comment
Share on other sites

i finally did what i wanted but with another way not withe size command.

i just don t understand why if you know the answer don t help the people to go on.

i thought that was the purpose of the forum.

thx anyway keep up !

Link to comment
Share on other sites

i finally did what i wanted but with another way not withe size command.

i just don t understand why if you know the answer don t help the people to go on.

i thought that was the purpose of the forum.

thx anyway keep up !

You can see by the enormous amount of threads that there are a lot of people helping around here!!

The problem is, Many have came here with Malicious intentions, so when we see a "new guy on the block" asking potentially dangerous questions, we hesitate. No one helping here want's Autoit to have a bad reputation.

8)

NEWHeader1.png

Link to comment
Share on other sites

  • Developers

i finally did what i wanted but with another way not withe size command.

i just don t understand why if you know the answer don t help the people to go on.

i thought that was the purpose of the forum.

thx anyway keep up !

When you can figure these type of things out for yourself, only then its "more likely" you understand what you are doing.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...