Jump to content

Delete files Every (n)Seconds


Recommended Posts

  • Developers

... but it isn't wrong to assume you at least open the helpfile and do some research yourself first ....... right?

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

19 minutes ago, Colduction said:

I don't know carefully English language, if i knew i didn't Post this topic... 

Well, we all need to start somewhere.  Start looking at the function FileDelete (), copy the example into a file.au3 and run it.  Then modify it for the folder you are targetting with the files you want to delete.  Once it is working look at the timer functions.  Try to put something together and post your code.  We will be able to assist you at that moment...If you can't do that, I suppose you should hire someone to do it for you.

Link to comment
Share on other sites

  • Developers
26 minutes ago, Colduction said:

I don't know carefully English language, if i knew i didn't Post this topic... 

So you do want others to do the coding for you...   right, good luck with that. ;) 

 

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

11 minutes ago, Nine said:

Well, we all need to start somewhere.  Start looking at the function FileDelete (), copy the example into a file.au3 and run it.  Then modify it for the folder you are targetting with the files you want to delete.  Once it is working look at the timer functions.  Try to put something together and post your code.  We will be able to assist you at that moment...If you can't do that, I suppose you should hire someone to do it for you.

I know some common functions, but i want to Loop this action, how can i? 

Link to comment
Share on other sites

  • Developers
42 minutes ago, Colduction said:

No, change your mind... 

You can don't help me =) 

Yea right, you could have spent the time posting these avoiding posts to open that helpfile and find what you need... it really isn't that hard unless you don't rry.

42 minutes ago, Colduction said:

You can don't help me =) 

No idea what that really mean.

 

8 minutes ago, Colduction said:

I know some common functions, but i want to Loop this action, how can i? 

So this is the only help you are going to get until you show some effort:

Open the Helpfile:Type Loop in the search box and click search. You will find something like: 

https://www.autoitscript.com/autoit3/docs/intro/lang_loops.htm

Happy coding,
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

sleep(1000)    ; = 1 second

If you press F1 you get the help file. For every function there is an example

First lookup in the help file

Do

For

While

Then lookup

Sleep()

Then 

FileDelete ()

FileRecycle ()  

BUT are you sure you want to delete DATABASE FILE? .db files are databases. They have information in them? 

Take care you not removing the wrong files.

We all started on the F1 key (Help File) and learned all the command, So if you want to get very good, take some time and have a good read. Then things in AutoIT get really easy.

 

;These are 3 diffrent loop examples to learn from.
; Since you are new a little boost
; Also Research ContinueLoop and Exitloop

; ----------------------------------
Local $xi = 0
Do 
Sleep(1000)
ConsoleWrite("Hello World 1 - Loop# " & $xi & @CRLF)
$xi = $xi + 1
Until $xi = 10
; ----------------------------------
Local $xii = 0
For $xii = 0 to 10   ; You can also use a "Step" here to say ever 1 or 2 steps (every other loop extra)
Sleep(1000)
ConsoleWrite("Hello World 2 - Loop# " & $xii & @CRLF)
Next
; ----------------------------------
Local $xiii = 10
While 1
If $xiii = 10 Then Exitloop  ; IF THIS LINE IS REMOVED IT BECOMES A ENDLESS LOOP
Sleep(1000)
ConsoleWrite("Hello World 3 - Loop# " & $xiii & @CRLF)
 $xiii = $xiii + 1
Wend
; ----------------------------------

 

Edited by Dwalfware
Link to comment
Share on other sites

1 minute ago, Dwalfware said:

I code like this purposely to make it difficult for other programmers

I suppose it is the best excuse you could find to make most poorly written scripts...

Link to comment
Share on other sites

9 hours ago, Nine said:

I suppose it is the best excuse you could find to make most poorly written scripts...

its real, I love it and they hate it with a passion. Its like someone done a WS strip lol

Just doing my Zen thing "What I take, I give back" and out of here ;)

Edited by Dwalfware
Link to comment
Share on other sites

11 hours ago, Earthshine said:

I wouldn’t employ anyone not willing to write code properly. That’s not something that’s generally tolerated at other companies. It means you’re not a team player

Good, that is your preference. Thankfully there are MILLIONS of employers out there and very few coders, each with their own style and more than 90% of them like to code in ways what secure them their jobs with out been rotated out for cheaper labor. Many holding the I.P of their code in their agreements. Just the way it is.

Are you sure you're not British? They like these null contracts. 

Edited by Dwalfware
Link to comment
Share on other sites

You’re not making anything harder except for yourself and the other  probably think you’re stupid

 Anyone can run tidy on your nonsense code and being belligerent and making it difficult is a dead giveaway to a bad employee

You can’t work for professionals that’s for sure because they wouldn’t allow this. There are such things as code reviews.  Anyway have fun being a belligerent employee and writing crappy code

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

9 hours ago, Earthshine said:

You’re not making anything harder except for yourself and the other  probably think you’re stupid

 Anyone can run tidy on your nonsense code and being belligerent and making it difficult is a dead giveaway to a bad employee

You can’t work for professionals that’s for sure because they wouldn’t allow this. There are such things as code reviews.  Anyway have fun being a belligerent employee and writing crappy code

Too much drama my friend, thank you for your views, no one is judging you nor how you operate, everyone has a choice.

 

Edited by Dwalfware
Link to comment
Share on other sites

I would like to point this Post out to the MOD as it seems some cyber bulling going on here is rapid with the normal lot.

Though I appreciate them helping people, they also forgot about compassion to newbies looking for help.

You can address the situation or allow them to continue treating people poorly looking for help.

It is not the AUTOIT I know and loved. Clearly just a lot of baiting to get expelled from the forums. Some empathy would greatly improve things.

Edited by Dwalfware
Link to comment
Share on other sites

  • Jos locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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