Jump to content
Sign in to follow this  
RestrictedUser

Delete files Every (n)Seconds

Recommended Posts

Hello guys, i have started AutoIt Scripting in 5 days, i want to know how to delete *.db files in;

C:\New Folder\

Folder every (n)Seconds

 

Thanks for your care all AutoIt Members❤️❤️

Share this post


Link to post
Share on other sites
8 minutes ago, Jos said:

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

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
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.
  :)

Share this post


Link to post
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? 

Share this post


Link to post
Share on other sites
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.
  :)

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

@Dwalfware Have you ever heard about indentation ? Because it is really unpleasant to read your code. IMHO.

Edited by Nine

Share this post


Link to post
Share on other sites
9 hours ago, Nine said:

@Dwalfware Have you ever heard about indentation ? Because it is really unpleasant to read your code. IMHO.

I know, sorry, I code like this purposely to make it difficult for other programmers at work . I am so use to it lol o:)

Share this post


Link to post
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...

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

 

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...