Results 1 to 2 of 2

Thread: Need batch file to delete user files in Windows XP

  1. #1
    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.

  2. #2
    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

Similar Threads

  1. Creating a batch file to find and delete certain files
    By Damien25 in forum TroubleShoot 98
    Replies: 3
    Last Post: 11-01-2014, 09:58 AM
  2. Deleting and renaming files using Batch file on Windows 7 x64
    By Aerona in forum Windows x64 Edition
    Replies: 2
    Last Post: 17-05-2011, 11:51 AM
  3. User inputs in Batch (.bat) files
    By Gap meer in forum Software Development
    Replies: 3
    Last Post: 21-05-2009, 12:06 PM
  4. Batch file to delete files dynamically
    By freelancer24 in forum Windows Server Help
    Replies: 3
    Last Post: 08-02-2009, 02:33 AM
  5. Windows scheduler: Running a batch file as another user?
    By Andrew Hodgson in forum Windows Server Help
    Replies: 9
    Last Post: 10-03-2008, 09:48 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,715,358.14538 seconds with 17 queries