Jump to content
Sign in to follow this  
ENTERg

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

Recommended Posts

ENTERg

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 !!!

Share this post


Link to post
Share on other sites
Valuater

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

Share this post


Link to post
Share on other sites
LurchMan

$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.

Share this post


Link to post
Share on other sites
WideBoyDixon

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

Share this post


Link to post
Share on other sites
LurchMan

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.

Share this post


Link to post
Share on other sites
ENTERg

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 !

Share this post


Link to post
Share on other sites
Valuater

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

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
trancexx

As Kennedy said: And so, my fellow Americans: ask not what your country can do for you - ask what you can do for your country.

It's not related? ... no, it's not ^_^


♡♡♡

.

eMyvnE

Share this post


Link to post
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
Sign in to follow this  

×