Creating a batch file

Discussion in 'Windows 64bit' started by =?Utf-8?B?U3VwZXJjaGVm?=, Mar 23, 2006.

  1. The problem i have is that i am looking to set up the schedulers to run a
    disk clean-up on my machines But the machines have multi partitions and i
    only require the C Drive to be cleaned out. I have been told that to get the
    scheduler to complete the task whilst away from the machines that I would
    need to create a batch file and allow the scheduler to run the batch file.
    if this is correct can anyone give me the text for the batch file that would
    run the disk clean-up

    Many thanks
     
    =?Utf-8?B?U3VwZXJjaGVm?=, Mar 23, 2006
    #1
    1. Advertisements

  2. What program do you mean by "disk clean-up"? I'm afraid I can't write a
    batch file unless I know what program it is you're trying to run.

    The general syntax of the batch file would be:

    @echo off
    REM batch file to do xyz
    Drive:\fullpath\exectuable /switches <target> > c:\temp\batchfile.log


    --
    Charlie.
    http://msmvps.com/xperts64

    Superchef wrote:
    > The problem i have is that i am looking to set up the schedulers to run a
    > disk clean-up on my machines But the machines have multi partitions and i
    > only require the C Drive to be cleaned out. I have been told that to get
    > the scheduler to complete the task whilst away from the machines that I
    > would need to create a batch file and allow the scheduler to run the
    > batch file. if this is correct can anyone give me the text for the batch
    > file that would run the disk clean-up
    >
    > Many thanks
     
    Charlie Russel - MVP, Mar 23, 2006
    #2
    1. Advertisements

  3. Hello
    Use cleanmgr to clean the drive:
    315246 How to Automate the Disk Cleanup Tool in Windows XP
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;315246


    Thanks,
    Darrell Gorter[MSFT]

    This posting is provided "AS IS" with no warranties, and confers no rights
    --------------------
    <From: "Charlie Russel - MVP" <>
    <References: <>
    <Subject: Re: Creating a batch file
    <Date: Thu, 23 Mar 2006 09:25:04 -0800
    <Lines: 26
    <X-Priority: 3
    <X-MSMail-Priority: Normal
    <X-Newsreader: Microsoft Outlook Express 6.00.3790.1830
    <X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830
    <X-RFC2646: Format=Flowed; Original
    <Message-ID: <#>
    <Newsgroups: microsoft.public.windows.64bit.general
    <NNTP-Posting-Host: h24-207-96-14.cst.dccnet.com 24.207.96.14
    <Path: TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
    <Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.windows.64bit.general:31821
    <X-Tomcat-NG: microsoft.public.windows.64bit.general
    <
    <What program do you mean by "disk clean-up"? I'm afraid I can't write a
    <batch file unless I know what program it is you're trying to run.
    <
    <The general syntax of the batch file would be:
    <
    <@echo off
    <REM batch file to do xyz
    <Drive:\fullpath\exectuable /switches <target> > c:\temp\batchfile.log
    <
    <
    <--
    <Charlie.
    <http://msmvps.com/xperts64
    <
    <Superchef wrote:
    <> The problem i have is that i am looking to set up the schedulers to run a
    <> disk clean-up on my machines But the machines have multi partitions and i
    <> only require the C Drive to be cleaned out. I have been told that to get
    <> the scheduler to complete the task whilst away from the machines that I
    <> would need to create a batch file and allow the scheduler to run the
    <> batch file. if this is correct can anyone give me the text for the batch
    <> file that would run the disk clean-up
    <>
    <> Many thanks
    <
    <
    <
     
    Darrell Gorter[MSFT], Mar 23, 2006
    #3
  4. I was trying to use cleanmgr Does this help

    grateful for the help

    "Charlie Russel - MVP" wrote:

    > What program do you mean by "disk clean-up"? I'm afraid I can't write a
    > batch file unless I know what program it is you're trying to run.
    >
    > The general syntax of the batch file would be:
    >
    > @echo off
    > REM batch file to do xyz
    > Drive:\fullpath\exectuable /switches <target> > c:\temp\batchfile.log
    >
    >
    > --
    > Charlie.
    > http://msmvps.com/xperts64
    >
    > Superchef wrote:
    > > The problem i have is that i am looking to set up the schedulers to run a
    > > disk clean-up on my machines But the machines have multi partitions and i
    > > only require the C Drive to be cleaned out. I have been told that to get
    > > the scheduler to complete the task whilst away from the machines that I
    > > would need to create a batch file and allow the scheduler to run the
    > > batch file. if this is correct can anyone give me the text for the batch
    > > file that would run the disk clean-up
    > >
    > > Many thanks

    >
    >
    >
     
    =?Utf-8?B?U3VwZXJjaGVm?=, Mar 24, 2006
    #4
  5. See MS KB article: Q253597.
    http://support.microsoft.com/default.aspx?scid=kb;en-us;Q253597. It's all
    about how to automate disk cleanup using cleanmgr.

    --
    Charlie.
    http://msmvps.com/xperts64

    Superchef wrote:
    > I was trying to use cleanmgr Does this help
    >
    > grateful for the help
    >
    > "Charlie Russel - MVP" wrote:
    >
    >> What program do you mean by "disk clean-up"? I'm afraid I can't write a
    >> batch file unless I know what program it is you're trying to run.
    >>
    >> The general syntax of the batch file would be:
    >>
    >> @echo off
    >> REM batch file to do xyz
    >> Drive:\fullpath\exectuable /switches <target> > c:\temp\batchfile.log
    >>
    >>
    >> --
    >> Charlie.
    >> http://msmvps.com/xperts64
    >>
    >> Superchef wrote:
    >>> The problem i have is that i am looking to set up the schedulers to run
    >>> a disk clean-up on my machines But the machines have multi partitions
    >>> and i only require the C Drive to be cleaned out. I have been told
    >>> that to get the scheduler to complete the task whilst away from the
    >>> machines that I would need to create a batch file and allow the
    >>> scheduler to run the batch file. if this is correct can anyone give me
    >>> the text for the batch file that would run the disk clean-up
    >>>
    >>> Many thanks
     
    Charlie Russel - MVP, Mar 24, 2006
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.