Go Back   TechArena Community > Technical Support > Computer Help > Windows XP > Windows XP Support
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Need batch file to delete user files in Windows XP

Windows XP Support


Reply
 
Thread Tools Search this Thread
  #1  
Old 26-05-2011
Member
 
Join Date: May 2011
Posts: 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.

Reply With Quote
  #2  
Old 26-05-2011
Member
 
Join Date: Apr 2008
Posts: 586
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
)
Follow the below code to delete a particular file:
Code:
del /s /q c:\Temp\*
rmdir /s /q c:\Temp\
mkdir c:\Temp
Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows XP > Windows XP Support
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Need batch file to delete user files in Windows XP"
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


All times are GMT +5.5. The time now is 10:55 PM.