command prompt


  1. Posts : 5
    Windows 7 x64 X32
       #1

    command prompt


    Hi all i need you help me a thing

    I went to use autosave all text on command prompt (CMD), how can i do or use what command prompt cade for mark it autosave when i used command prompt.


    Example :


    Color 0a

    %echo KHC_Office_Manager
    Ping 10.192.172.12
    %echo KHC_Office_Buying
    Ping 10.192.172.11


    color 1a

    pause

    what i need is autosave to my desktop is Ping today.txt


    Thank All :)
      My Computer


  2. Posts : 6,330
    Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64 +Linux_VMs +Chromium_VM
       #2

    You can try this and see if it works and does what you want:

    Color 0a

    %echo KHC_Office_Manager > "Desktop\Ping today.txt"
    Ping 10.192.172.12 >> "Desktop\Ping today.txt"
    %echo KHC_Office_Buying >> "Desktop\Ping today.txt"
    Ping 10.192.172.11 >> "Desktop\Ping today.txt"

    color 1a

    pause
      My Computer


  3. Posts : 5
    Windows 7 x64 X32
    Thread Starter
       #3

    it doesn't work pelz give me more code

    example a giant

    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    C:\Documents and Settings\BATC>ping 192.168.1.1

    Pinging 192.168.1.1 with 32 bytes of data:

    Reply from 192.168.1.1: bytes=32 time=1ms TTL=149
    Reply from 192.168.1.1: bytes=32 time=1ms TTL=149
    Reply from 192.168.1.1: bytes=32 time=1ms TTL=149
    Reply from 192.168.1.1: bytes=32 time=12ms TTL=149

    Ping statistics for 192.168.1.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
    Minimum = 1ms, Maximum = 12ms, Average = 3ms

    C:\Documents and Settings\BATC>

    And then it well saveauto to desktop file.txt

    thank you for helpful to me !
      My Computer


  4. Posts : 6,330
    Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64 +Linux_VMs +Chromium_VM
       #4

    I'm guessing you get errors because of folder path issues.
    I'm guessing you are saving these commands as a BAT file and running the BAT file.

    One way you might fix this is adding a CD (Change Directory) command to the BAT file.

    I added the cd C:\Users\DavidE\ to my BAT file and this works for me.
    You will need to change DavidE to YOUR USERID for this cd command.


    Here is my BAT file:
    Color 0a

    cd C:\Users\DavidE\

    %echo KHC_Office_Manager > "Desktop\Ping today.txt"
    Ping 10.192.172.12 >> "Desktop\Ping today.txt"
    %echo KHC_Office_Buying >> "Desktop\Ping today.txt"
    Ping 10.192.172.11 >> "Desktop\Ping today.txt"

    color 1a

    pause
    If you do have problems post a screen print of the CMD window showing the errors.
    Screenshots and Files - Upload and Post in Seven Forums

    Here is a screen print of what i see when i run the BAT file...
    command prompt-batsp01.png
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 02:01.
Find Us