• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Anyone know if any type of program, batch file or script that would do this?

Nocturnal

Lifer
Does anyone know of any type of script, batch file or program that will go into the C:\Documents and Settings directory and into each user account and then go to C:\Documents and Settings\User\Local Settings and then delete all folders except for Application Data.
This is mainly to help with doing data backups for clients. The Temp and TIF is filled with junks that is never needed for data backup.
Any ideas? I would prefer it if was something that had minimal interaction and just kind of worked on the drive by going into each user account and removing those specified files.
 
Originally posted by: Nocturnal
Any recommendations for a language? Or a simple batch file?

You can do what you want with a windows batch file.. look at the windows help and search for "for" or type help for at the cmd prompt.

On the other hand this would be a good excuse to learn python or perl but if you don't want to install python or perl on the machines to run the script learn VBScript.


I have a batch file that does something similar to what you want (see below).
It basically CD's to the temp directory
Then loops through all the folders (*.*) and checks to see if the file or folder is not "sessiondata" and deletes them.
Not sure why i used this specific script but it was to clean my temps directory.... the sessiondata thing is from when i used to do php and didnt want to del my session info.

You should be able to adapt this to what you want.


----
Code:
@ECHO OFF

ECHO "%DATE% %TIME% - Begin Deleting Temp. Files

PUSHD %temp%

FOR /D %%v IN (*.*) DO (
    IF NOT "%%v"=="sessiondata" (
       ECHO %DATE% %TIME% - Deleting %%v
       RD "%%v" /S /Q
    )
)

POPD





 
Back
Top