|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
Need batch file to delete user files in Windows XP
I need help with a batch file for Windows XP. Here is what I have so far: @ Echo Off rmdir "C:\Documents and Settings\All Users\Application Data\Nuance\Dragon SDK Client Edition9" /Q/S>nul rmdir "C:\Documents and Settings\All Users\Application Data\Nuance\Pssdk" /Q/S>nul rmdir "C:\Documents and Settings\All Users\Application Data\Nuance\PowerScribe\areeves" /Q/S>nul rmdir "C:\Documents and Settings\All Users\Application Data\Nuance\PowerScribe\aalli" /Q/S>nul The last two commands in my batch file removes folders that are created by users. These file will be re-created once the user logs back in to the application. Is there a way for me to remove all files from the \Powerscribe folder without naming each user individually? I know I can delete the \PowerScribe folder as a whole as I?ve done with the previous commands but I have an xml doc in the \PowerScribe folder that contains system settings for the application and I don?t want to delete that. Any help would be appreciated. |
#2
| |||
| |||
re: Need batch file to delete user files in Windows XP If you wish to delete files which are 7 days old then follow the following Code: Code: @ECHO OFF CLS FOR /R C:\User_share %%FILE IN (*.*) DO ( ECHO starting if IF(0 == (ISDATE %%~zFILE before TODAY -7)) DEL %%FILE ) Code: del /s /q c:\Temp\* rmdir /s /q c:\Temp\ mkdir c:\Temp |
![]() |
|
Tags: bat file, batch file, windows xp |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating a batch file to find and delete certain files | Damien25 | TroubleShoot 98 | 3 | 11-01-2014 09:58 AM |
Deleting and renaming files using Batch file on Windows 7 x64 | Aerona | Windows x64 Edition | 2 | 17-05-2011 11:51 AM |
User inputs in Batch (.bat) files | Gap meer | Software Development | 3 | 21-05-2009 12:06 PM |
Batch file to delete files dynamically | freelancer24 | Windows Server Help | 3 | 08-02-2009 02:33 AM |
Windows scheduler: Running a batch file as another user? | Andrew Hodgson | Windows Server Help | 9 | 10-03-2008 09:48 AM |