Most Recent Posts
No refills on Schedule 4 Meds
by koby - 05/06/2025 9:24 AM
AC Version 12.3
by Raj1 - 05/06/2025 8:52 AM
Search for never seen patients
by JBS - 05/05/2025 2:16 PM
Fixing PRESCRIPTION DRUG MONITORING in Windows 11 Pro
by VTWilson - 05/01/2025 12:55 PM
An automated process failed: MedsUdates
by ChrisFNP - 04/28/2025 3:49 PM
New Feature?
by ChrisFNP - 04/22/2025 6:37 PM
Here is a new one
by ChrisFNP - 04/22/2025 6:20 PM
I won't get help because I am I
by Bert - 04/22/2025 9:09 AM
Member Spotlight
ryanjo
ryanjo
Central Florida
Posts: 2,084
Joined: November 2006
Newest Members
It's me, Paradise Family, MedCode, MZ Medical Billi, girlfromwebpage
4,593 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2012
Posts: 82
Member
OP Offline
Member
Joined: Apr 2012
Posts: 82
AC backups fill up the hard drive in about a week. Can anyone help with syntax of batch file to delete backups more than 5 (or n) days old? Following did not work. Does anyone know the correct solution?

del F:\AmazingCharts\Backup\ *.* /s /d -5


Joined: Apr 2011
Posts: 2,316
Likes: 2
G
Member
Offline
G
Member
Joined: Apr 2011
Posts: 2,316
Likes: 2

Joined: Apr 2012
Posts: 82
Member
OP Offline
Member
Joined: Apr 2012
Posts: 82
Thanks, Sandeep.

Can you post this batch file in an area where people can access it anytime. I searched for it before posting and did not find it. Or better put it in helpful downloads file forum. I am going to copy your batch file here so people can see it.

forfiles -p "C:\Amazing Charts\Backup" -s -m *.enc* /D -30 /C "cmd /c del @path"

Originally Posted by Sandeep
If you open up notepad

Enter the following line:
Quote
forfiles -p "C:\Amazing Charts\Backup" -s -m *.enc* /D -30 /C "cmd /c del @path"
  • "C:\Amazing Charts\Backup" is the path to your AC Folder.
  • The 30 means clear files older than 30 days. Adjust accordingly.

Then save the file with the extension .bat, that will create a batch file which you can click to run the script. You can also use the task scheduler to make it run on a daily basis.

It's a very useful script. You can use it to clear old faxes in the fax console (Mainpine users) or clear old backups on an external drive.

Joined: Apr 2011
Posts: 2,316
Likes: 2
G
Member
Offline
G
Member
Joined: Apr 2011
Posts: 2,316
Likes: 2
You can find it on my blog.

http://luthratech.com/blog/2013/12/19/clearing-old-backups-ac/

There's a special category for Amazing Charts Tips/Tricks
http://luthratech.com/blog/category/amazing-charts/

If there is sufficient demand, I suppose we can start compiling useful tips and tricks in a thread. UBB isn't ideal for that type of stuff though.

Joined: Apr 2012
Posts: 82
Member
OP Offline
Member
Joined: Apr 2012
Posts: 82
That will be a great idea, to compile the tips and tricks in a thread on the mainboard so that people do not have to keep asking the same questions again and again. You can call it "Tricks Every Amazing Charts User Should Know". Believe me, I searched for "batch file" before this posting. I did not come across your original post, until you pointed me out to it. Your blog is very helpful, by the way, keep it up!

Joined: Sep 2012
Posts: 342
Likes: 7
Member
Offline
Member
Joined: Sep 2012
Posts: 342
Likes: 7
Dear SanjeevP,

A site-limited Google search will show what you want right away:

http://tinyurl.com/paeomab

Google's display makes it easier to find what you want.

As the example above shows, you just add a site:limit to a normal Google search:

site:http://amazingcharts.com/ub batch file delete backups

Save the search to your browser favorites to avoid retyping the tedious "site:http://amazingcharts.com/ub" whenever you want to search the AC forum.

Cheers,

Carl Fogel

Joined: Sep 2003
Posts: 12,874
Likes: 34
Member
Offline
Member
Joined: Sep 2003
Posts: 12,874
Likes: 34
http://amazingcharts.com/ub/ubbthreads.php/forums/5/1/Tips_and_Tricks

That forum has been around for years. Back in the day, there would be one post with tip. Now there are entire threads.


Bert
Pediatrics
Brewer, Maine

Joined: Apr 2012
Posts: 82
Member
OP Offline
Member
Joined: Apr 2012
Posts: 82
Sandeep,

For some reason my batch files are not working.

1. What is "-p" and does it have to be there?
2. For "cmd /c del @path" am I supposed to substitute path with my path and do I leave as it is quotes and all?

Joined: Sep 2003
Posts: 12,874
Likes: 34
Member
Offline
Member
Joined: Sep 2003
Posts: 12,874
Likes: 34
Nothing against Sandeep's script, and scripts are great when they are the only thing around, but I will never understand why no one takes advantage of the free program Auto Delete . You can do so much more with it, and I think you will find it more stable in the long run.


Bert
Pediatrics
Brewer, Maine


Moderated by  ChrisFNP, DocGene, Wendell365 

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Who's Online Now
0 members (), 98 guests, and 15 robots.
Key: Admin, Global Mod, Mod
Top Posters(30 Days)
JBS 4
koby 3
Bert 3
Top Posters
Bert 12,874
JBS 2,985
Wendell365 2,365
Sandeep 2,316
ryanjo 2,084
Leslie 2,002
Wayne 1,889
This board is dedicated to the memory of Michael "Indy" Astleford. February 6, 1961 -- April 16, 2019




SiteLock
Powered by UBB.threads™ PHP Forum Software 7.7.5