Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Help Needed Please on file management.

$
0
0

Hello, 

  thank you for your time and help.    How can I do the following process:

 

in a specific foler (let´s say folder name is  Data)  I have a lot of  .mdb  files, and more are created every day.  I need to read the latest one, so, I´m thinking of copying it to always the same file name using the line comand  copy  "file".mdb  myfile.mdb /y     (/y switch is to overwrite without prompting).

"file"  is the last file created on the  Data folder.  How do I know which file is the latest one every time?

More info:

I have, for example,     1515_May27  file as the latest file,   in 2 hours (or any other time), I will have 2020_May27   file,   tomorrow, I will have  1515_May28   4040_May28

 

so,  today, I need to:

copy 1515_May27.mdb   myfile.mdb /y

 

in 2hours, I need to

copy 2020_May27.mdb  myfile.mdb /y

 

tomorrow

copy 1515_May28.mdb  myfile.mdb /y

 

and later

copy 4040_May28.mdb  myfile.mdb /y

 

 

that is,  I will be reading  myfile.mdb all the time, but that will be created by copying from a different source every time, the source will be the latest file created on the Data folder.  How do I know which is the latest file on the folder?

 

need help with the script pls.

 

Thx a lot!!

 


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>