MSFN Forum: Delete switch - MSFN Forum

Jump to content



Unattended CD/DVD Guide Homepage · MSFN Forum Rules

Welcome to the Applications Installs forum. Make sure you read the forum rules before you start posting.

Links/Requests to warez and/or any illegal material (porn, cracks, serials, etc..) will not be tolerated. Discussion of circumventing WGA/activation/timebombs/keygens or any other illegal activity will also not be tolerated.

We try our best to keep this forum clean of illegal content. If you see any illegal activity use the "report" button you find in every post to report the specific post to the moderators. If you ignore any of the rules you will be banned without notice.

Read Forum Rules
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Delete switch Rate Topic: -----

#1 User is offline   nas8060 

  • Group: Members
  • Posts: 7
  • Joined: 13-August 05

Posted 13 August 2005 - 02:44 AM

I dont know how to do the silent install for certian programs and dont have time given im attending two schools, have a full time job and a girlfriend (so...two full time jobs) I wrote a small batch file to copy the install files straight to the desktop. Then I wrote another one to delete the files after I have installed them, only I cant find a switch that works without having to answer "Y" and enter after each one. Here is the batch file. If I miss anything or you need more information please let me know.

CLS
@ECHO off
Title * * * Time To Clean Your Desk * * *

Echo.
Echo Deleting Setup Program Files
DEL "%systemdrive%\Install\FreeAV" "%systemdrive%\Documents and Settings\All Users\Desktop" /Y
DEL "%systemdrive%\Install\REGISTRY" "%systemdrive%\Documents and Settings\All Users\Desktop" /Y
DEL "%systemdrive%\Install\VCDgear" "%systemdrive%\Documents and Settings\All Users\Desktop" /Y
DEL "%systemdrive%\Install\Riochet" "%systemdrive%\Documents and Settings\All Users\Desktop" /Y
DEL "%systemdrive%\Install\dB PowerAMP" "%systemdrive%\Documents and Settings\All Users\Desktop" /Y

pause


#2 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,195
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 13 August 2005 - 04:18 AM

COPY

#3 User is offline   nas8060 

  • Group: Members
  • Posts: 7
  • Joined: 13-August 05

Posted 13 August 2005 - 12:13 PM

COPY??? ;)

#4 User is offline   Siginet 

  • Windows XP PowerPacker Creator
  • PipPipPipPipPip
  • Group: Members
  • Posts: 722
  • Joined: 22-January 05

Posted 13 August 2005 - 12:29 PM

Deletes one or more files.

DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names
ERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names

  names         Specifies a list of one or more files or directories.
                Wildcards may be used to delete multiple files. If a
                directory is specified, all files within the directory
                will be deleted.

  /P            Prompts for confirmation before deleting each file.
  /F            Force deleting of read-only files.
  /S            Delete specified files from all subdirectories.
  /Q            Quiet mode, do not ask if ok to delete on global wildcard
  /A            Selects files to delete based on attributes
  attributes    R  Read-only files            S  System files
                H  Hidden files               A  Files ready for archiving
                -  Prefix meaning not

If Command Extensions are enabled DEL and ERASE change as follows:

The display semantics of the /S switch are reversed in that it shows
you only the files that are deleted, not the ones it could not find.


Or it looks like you want to delete the entire folders.

Try the RD command.
Removes (deletes) a directory.

RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path

    /S      Removes all directories and files in the specified directory
            in addition to the directory itself.  Used to remove a directory
            tree.

    /Q      Quiet mode, do not ask if ok to remove a directory tree with /S


Echo Deleting Setup Program Files
RD /S /Q "%systemdrive%\Install\FreeAV" "%systemdrive%\Documents and Settings\All Users\Desktop"
RD /S /Q "%systemdrive%\Install\REGISTRY" "%systemdrive%\Documents and Settings\All Users\Desktop"
RD /S /Q "%systemdrive%\Install\VCDgear" "%systemdrive%\Documents and Settings\All Users\Desktop"
RD /S /Q "%systemdrive%\Install\Riochet" "%systemdrive%\Documents and Settings\All Users\Desktop"
RD /S /Q "%systemdrive%\Install\dB PowerAMP" "%systemdrive%\Documents and Settings\All Users\Desktop"


P.S. You can find most cmd switches by typing the command and using the switch /?

This post has been edited by Siginet: 13 August 2005 - 12:31 PM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy