Hey Guys!
Today I have got a small but interesting thing in Ax. We had a situation wherein space of C drive was reaching the alarming level of the Ax-client server (from where all users access Ax). I ran the tool WizTree which displays the analysis of a drive as per the space occupancy. It showed that the maximum amount of space was taken by the AppData folder and I knew what needs to be done next.
The problem was auc files had accumulated for all the users which were summed up to almost 30Gb. So, I decided to delete them but the challenge was how to delete it for all the users at once. So I took help from my master (yes, it's Google) and created a batch which will traverse through all the users AppData folder and delete the auc/kti files.
1. Open Notepad.
2. Paste the below commands there:
for /D %D in ("C:\USERS\*") do del "%~fD\AppData\Local\*.auc"
for /D %D in ("C:\USERS\*") do del "%~fD\AppData\Local\*.kti"
pause
3. Save the notepad as .bat file.
4. Run the batch file and it will delete all the auc/kti files for all the users.
Credits: http://blog.bhsolutions.com/index.php/2014/05/dynamics-ax-2012-spring-cleaning-app-data/
https://stackoverflow.com/questions/34019989/batch-file-copy-all-users-profile-app-data
Today I have got a small but interesting thing in Ax. We had a situation wherein space of C drive was reaching the alarming level of the Ax-client server (from where all users access Ax). I ran the tool WizTree which displays the analysis of a drive as per the space occupancy. It showed that the maximum amount of space was taken by the AppData folder and I knew what needs to be done next.
The problem was auc files had accumulated for all the users which were summed up to almost 30Gb. So, I decided to delete them but the challenge was how to delete it for all the users at once. So I took help from my master (yes, it's Google) and created a batch which will traverse through all the users AppData folder and delete the auc/kti files.
1. Open Notepad.
2. Paste the below commands there:
for /D %D in ("C:\USERS\*") do del "%~fD\AppData\Local\*.auc"
for /D %D in ("C:\USERS\*") do del "%~fD\AppData\Local\*.kti"
pause
3. Save the notepad as .bat file.
4. Run the batch file and it will delete all the auc/kti files for all the users.
Credits: http://blog.bhsolutions.com/index.php/2014/05/dynamics-ax-2012-spring-cleaning-app-data/
https://stackoverflow.com/questions/34019989/batch-file-copy-all-users-profile-app-data