MS Dos command or batch file script

How to remove files from a folder while MS-DOS command or batch file script keeping the last 15 days in windows server 2003R? Help, please

This issue is beyond the scope of this site (for consumers) and to be sure, you get the best (and fastest) reply, we have to ask either on Technet (for IT Pro) or MSDN (for developers)

Tags: Windows

Similar Questions

  • ESX command line batch file

    We run ESX 4.x and I need to make about 200 CLI commands in the command-line of each host.  Is it possible to create a batch file in the shell ESX I can just stick all these commands in and then run time?

    In the Windows world, it would be easier that Paste commands into a *.bat and then file by running it at the time, but I have no idea how to make it in the world of ESX.

    Thank you!

    Since the Console is based on Linux file extension would usually be .sh (e.g. myscript.sh). To run it, you need to make it executable with chmod + x myscript.sh or run it using sh./myscript.sh.

    André

  • Run a batch file script

    Hi all

    I want to run a SQL script that is executed from a batch file.
    Lets say, I have the file loader.bat. This .bat file connects to Oracle and wants
    to run the .sql file

    The content of the file loader.bat is
    sqlplus 
    @C:\temp_val_id.sql
    At runtime, it calls in the name of user and password. I enter the user name and password and then log on to Oracle
    But the temp_val_id.sql file isn't exectuted.

    The output is as below, but .sql file does not run
    C:\>sqlplus
    
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Mar 28 17:19:50 2012
    
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    
    Enter user-name: utest_tt_senayat/password@silver3
    
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL>
    I'm now trying another method
    sqlplus 
    @@C:\temp_val_id.sql
    The result is the same as above. Do not run temp_val_id.sql

    Could someone please help me,

    Thanks in advance
    Saaz

    Saaz Ena wrote:
    sqlplus/nolog @test.sql

    test.sql content:

    connect &user/&pass
    select sysdate from dual;
    exit;
    /
    
    C:\work\test>sqlplus /nolog @test
    
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Mar 28 16:21:12 2012
    
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    
    Enter value for user: system
    Enter value for pass: manager
    Connected.
    
    SYSDATE
    ---------
    28-MAR-12
    
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
  • sqlplus command inside batch files

    Hello

    Oracle9.2

    need commands from sqlplus, from the inside, the batch files without calling the file .sql separately. How can we do?

    Regarding

    Hello

    You can more orders in this code, but no select statements do not work here. Please provide your batch file as I'll be able to check the same.

    (
      echo alter database backup controlfile to trace;;
      echo shutdown immediate;
      echo exit
    )|sqlplus -s "sys/%password%@%tnsname% as sysdba" > Shutdown.log
    

    See you soon
    LIX.

    Published by: Kanchana dewaer on February 10, 2011 12:43

  • Batch file is not automatically end

    Hello friends,

    I'm Harnish Jouve of the India. Now a days I am facing a question about the batch file does not end.

    I have a database server and I need to transfer data from server to Client PC. For this, I create a batch file. My batch file is run with success and transfer data were but batch file is not terminated automatically. Please find the below batch file script for the same.

    Script below is run on Server 2003

    xcopy \\172.17.7.11\BACKUPS\MORNING\*. * \\172.17.7.55\ORABKP\morning/c/f/r/z

    Data must transfer the server form 2003 to windows 7 PC

    Please help me to solve the same.

    Thank you and best regards,

    Harnish Jouve

    This issue is beyond the scope of this site and must be placed on Technet or MSDN

    http://social.msdn.Microsoft.com/forums/en-us/home

  • batch file for statements to sqlplus

    Jin
    I want to run the batch file scripts, I use the following syntax


    sqlplus user1/user1@instance C:\Batch File\Create.sql
    output

    and in

    create table tab1 as .sql file (select * from emp)
    commit;

    When I double click on the file fighting his execution but the table is not created in the backend

    Please help me

    Thank you
    Angelique
    Usage: SQLPLUS [ [
    

    From the help above must be a file @before address...

    sqlplus user1/user1@instance C:\Batch File\Create.sql
    becomes

    sqlplus user1/user1@instance "@C:\Batch File\Create.sql"
    

    check the qoutes, because they are needed for names with spaces in directories.

    Ravi Kumar

    Ravi Kumar

  • MS-DOS (script) to execute in WindowsXP - batch file 'trap' the errorlevel

    I am writing a Batch MS-DOS (script) file to run in Windows XP.  It run 3 programs: PKZIP for z/OS by PKWARE, FTP (BACK) and an MS-DOS Application with us.  How I 'trap' the errorlevel to each of these programs to ensure that they completed successfully?

    Hello

    Because the problem is related to the batch file, I recommend that you post this question in the MSDN forum.
    http://social.msdn.Microsoft.com/forums/en-us/categories/

  • In bulk to rename files in a folder by using the DOS command line or a batch file.

    Can someone help with this problem, please?  I remember seeing the DOS command line to do a mass renaming of files in a folder or a batch file. for example, vacation photos are all in the format DSC00001.jpg to DSC001234 and I want to change it to something like, say, Rome0001.jpg to Rome1234.jpg.

    How about this:
    Go to the folder of your files in that.  Create a text file, and open it (Windows should use Notepad, that very well).
    in the file type:
    Ren dsc*.jpg rome*.jpg
    Now, save the file as:
    renamethem.bat
    (Make sure you call it ".bat" and save it as a txt document, which will make a simpel file and not add a strange formatting)
    From there, just double-click this file and it renames all your pictures accordingly.
    :)

    Old timer

  • Previously, work job FTP in the batch file gives message "error opening script file.

    I have two FTP jobs on two separate machines that I've been running as tasks scheduled for a few years with success.  They are on the same network, but we're on the field, the other is out of the field.  Both are Windows XP SP3.

    Starting this week, two of them fail when you try to load the actual script FTP file.    Here is an example of the ftp command that I use: FTP d - n-i-s:C:\scripts\getmyfiles.txt

    The message says "Error opening C:\scripts\getmyfiles.txt" and displays help FTP.  I should also mention that the FTP seems to work fine if I connect from the command prompt, and does not use a script file manually.

    Both of these batch files containing similar (different but calling script files) FTP commands were executed the week last successfully.

    Any suggestions are appreciated!

    Hi Kristin,

    The question you have posted is better suited to the MSDN forums. You can ask your question in the help link.

    http://social.msdn.Microsoft.com/forums/en/categories/

    Hope the helps of information.

  • Problems with batch files and command.

    I'm not too familiar with the support of the PC, but can follow the operational base.

    I had a problem with my windows vista machine.  Whenever I started, there was a poster on my screen batch file.  This was a company script provided departmental support of PC does not recognize.  It was as if the batch file has been stuck in a mode where it would display only instead of execution.  After a bit of back & comes with our IT supports people, they agreed to look into the problem.  They went under launch programs to ensure that batch files have been executed with the cmd program.  Now, it displays a MS-DOS window whenever I start.  I don't know why this is so.

    As my company IT Department is unable to help, I hope someone can give me some advice.

    Is there a place to check to find out WHY this dos window appears every time and how I could fix this situation.  I can't that hope that corporate batch files are run correctly.

    Thank you

    Ken

    Hello Ken,

    1. Since when are you facing this problem?

    2. the recent changes to the computer?

    3. is the computer on the domain by chance?

    If so, the question you have posted is related to Windows in adomain of work environment and would be better suited to the TechNet community. Please visit the link below to find a community that will support what ask you

    http://social.technet.Microsoft.com/forums/en-us/itprovistanetworking/threads

    If not,

    I suggest you to put the computer in aclean boot state .

    To help resolve the error and other messages, you can start Windows Vista by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.

    See the link below for more details:

    How to troubleshoot a problem by performing a clean boot in Windows Vista:

    http://support.Microsoft.com/kb/929135

    Note:

    When you are finished troubleshooting, follow these steps in the section above to reset the computer to start as usual.

    Kind regards

    Savan - Microsoft technical support.

  • Wait for the command, wait, batch, cmd file file, .bat, .cmd

    Hello, I am new on the BACK and script. I'm making a batch file or a .cmd file that run several files setup.exe, one after the other. The problem I have is that I can only find ways to delay based on TIME, rather than delay has not completed the first instance of setup.exe to start the following. Is there a command of the will that it is for me to run the first and then, once it is installed, run the second. The reason I need this works like this is that the second .exe does not work if one has not already been done. Thanks to you all.

    Please check on the Scripting Site at: http://technet.microsoft.com/en-us/scriptcenter/default.aspx where they offer a lot to help you create scripts, including a forum where you can post questions to people who are also specialists in scripts.  We do not cover this topic in the Forums of Windows answers.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • MS-DOS batch file (* .bat) ceased to run completely

    Recently, I met a problem with an old, old MS-DOS batch file.  All of a sudden, while trying to run in that the file has been opened by Notepad edit mode.  (???)  Investigation revealed that the default program for the *.bat files Notepad!  So, I changed the default to "Windows shell".  This has solved the problem of the notebook, but now presented another problem.  The batch file will not run completely.   The steps in the command file are: cd\ cd\dBASE chrmenu dBase III.  He runs the two cd\ but does not program dbase RL.  This program was written when way back and worked very well under Windows, Windows 95, Windows 98, Windows XP and even Windows 7 (32-bit Home Premium).  Now, all of a sudden, it's a failure.  I touched base with MS Tech twice with no luck.  Any ideas?

    You must restore your file associations for .bat files.

    Try the solution for files .bat on this page:

    «Difficulties of Association files for Windows 7»

    <>http://www.Winhelponline.com/blog/file-Asso-fixes-for-Windows-7/ >

    HTH,

    JW

  • 'mode' is not recognized as internal or external, command an executable program or batch file.

    I tried to post this in two areas forum now and were correct, so apologies in advance if this is not where I belong!

    Im trying to run Drush msysgit (drupal Shell installed specifically for windows). Everything was fine a few days ago and now the program always runs with the above error

    'mode' is not recognized as internal or external, command an executable program or batch file.

    I uninstalled all the programs involved. The error does not occur when running it through the window of own shell programs (Drush) but msysgit has a problem with the file in mode to 'find '. I asked in the forums own programs, but it seems that it is a windows error. -Maybe in relation to the MS-DOS file mode (name full mode.com) in the system32 folder.
    I tried also to include the file in the environment variables but no joy at all. Any ideas anyone?
    You might be able to give any help is very appreciated :)

    Hello

    Unfortunately, this is the wrong forum. The MSDN MS Dos forum would be appropriate to proceed with this application. Check out the link and ask the question.

    http://social.msdn.Microsoft.com/forums/en-us/isvvba/thread/bb0c2813-9c0e-477f-89ff-966470c61b4a/
  • Passage of the maxl script batch file value.

    Hi gurus,

    I want the user to select the scenario he wants to clear the data for a specific intersection in a cube of ASO for running batch file. Files and newspapers is as below

    Batch file:

    ECHO please select a scenario:

    ECHO A. actuals

    B. Budget echo

    choice/m C:AB '-> > enter a letter for the scenario you want to delete: "%1 '"

    IF ERRORLEVEL is 1 Set ScenarioName = law

    IF ERRORLEVEL == 2 Set ScenarioName = bud

    E:\Oracle\Middleware\user_projects\epmsystem3\EssbaseServer\essbaseserver1\bin\startMaxl.bat "C:\Users\TCleardata2.mxl" % ScenarioName %

    MaxL file:

    spool to 'C:\Users\Cleardatalog.txt ';

    / * Value Variables * /.

    Set vScenarioName = $1;

    Echo script: "$vScenarioName";

    connection username pwd on "IP:1423 Server";

    / * Erase data * /.

    ALTER database abc.abc clear data in the region ' {("$1", Final, FY15, P2, ACC_1011640)}' physical;

    echo * clear full *;

    disconnection;

    spool off;

    Log file:

    Scenario: law

    MAXL > connection username pwd on "IP:1423 Server";

    OK/INFO - 1051034 - user [username@pqr] connection.

    OK/INFO - 1241001 - connected to Essbase.

    *****************************************************************************

    MAXL > alter database abc.abc clear data in the region ' {("$1", Final, FY15, P2, ACC_1011640)}' physical;

    ERROR - 1260052 - syntax error in a MDX query on line 1 to token entry ' "$1".

    *****************************************************************************

    Full Claire *.

    MAXL > disconnect;

    Username is disconnected

    ___________________________________________________________________________________-

    in the MAXL if I write: law instead of ' $1 ' it works fine, but I can't take the user input, it is question of syntax?

    Below the command works fine:
    ALTER database abc.abc clear data in the region '{(law, Final, FY15, P2, ACC_1011640)}' physical;

    Can someone please let me know what I'm doing wrong here?

    Thank you

    RN

    I don't think that (alone) allows in this case - the problem is that the single quotes around the specification of the whole region removes extension variable (see Variables).

    Double quotes lose about $1, but also replace the single quotes around the specification of the entire region with quotes, i.e.:

    ALTER database abc.abc clear data in the region '{($1, Final, FY15, ACC_1011640, P2)}' physical;

  • Call via the FDM script batch file

    Hi all

    Here is the FDM script written to call the command via the Script FDM in import file, test the operation of the script by creating a vbscript file (* .vbs) to call the batch file and worked like charm. Please see the excerpt from the sciprt

    SubMonth = "Mar".

    SubYear = "FY15.

    ARG = trim (SubYear) & "" & trim (SubMonth)

    Set objWshShell = CreateObject ("Wscript.Shell")

    strCmd = "E:\hyperionfiles\batch\CalcActNew.bat" & Arg

    Line 53 objWshShell.Run 'strCmd', 0, True

    The error returned is

    Error.JPG

    Thank you

    Hi, no double quotes are needed to join strCmd it's a variable

    objWshShell.Run strCmd, 0, True

Maybe you are looking for

  • Screen flashing in Satellite L500D

    Welcome! I have a laptop Toshiba L500D. For about two weeks, something is happening with my laptop. Laptop is turned on and when I open the lid, or closed, the screen flashes, change colors, you can see the different bands in black and white or in co

  • IP directed broadcast to the

    Cisco routers have a feature called the IP-directed broadcast. It is the ability to send a UDP multicast from a device on a VLAN and forward it to a different VLAN.(Of the Cisco's Web site: allows the redirection of directed broadcasts.) When it is e

  • Resignation LabVIEW function generates crash report in executable

    Hello I use the labVIEW Quit to close an app when the VI is built into the executable. If LabVIEW is used, the application just stops and leaves the window opens. When the function quit LabVIEW is used in an file executable application is closed down

  • Error message - no installed updates

    I am trying to install SP2 for my 64 bit system of Vista (already have SP1 installed), and it is not install.  I tried the manual download and it still does not work.  Then tried to download the system error message update tool for Windows Vista for

  • Additional RAM installation

    Hello If I install extra RAM into my PC, I have to change the settings in XP or the system will automatically adjust anyway? See you soon.