Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: command prompt

08 Nov 2012   #1

Windows 7 x64 X32
 
 
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 System SpecsSystem Spec
.

09 Nov 2012   #2

Win 7 Pro x64 SP1, Win 7 Ult x86 SP1
 
 

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 System SpecsSystem Spec
09 Nov 2012   #3

Windows 7 x64 X32
 
 

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 System SpecsSystem Spec
.


10 Nov 2012   #4

Win 7 Pro x64 SP1, Win 7 Ult x86 SP1
 
 

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...
Name:  BatSP01.PNG
Views: 14
Size:  26.2 KB


My System SpecsSystem Spec
Reply

 command prompt




Thread Tools



Similar help and support threads for2: command prompt
Thread Forum
Command Prompt Tutorials
How to fix MBR through command prompt? General Discussion
Help needed executing command prompt command General Discussion
Run administrative command prompt from command prompt General Discussion
Solved Command Prompt General Discussion
command prompt bug ? General Discussion
Command Prompt command <ipconfig> not working Network & Sharing

Our Sites

Site Links

About Us

Find 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 05:23 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33