Solved

CMD batch file.

Posted on 2013-01-06
5
424 Views
Last Modified: 2013-01-28
I want to save the result of the CMD batch file in a location of my choice.

TheCMD batch file I have created results in some excel files which are stored in temp folder.

But i want to save it somewhere else like C\temp\xyz.

so that all my excel files are saved into xyz folder.


I have tried to change the path from C\temp\ to C\temp\xyz but does not help-
0
Comment
Question by:AmmarDJ
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 8

Expert Comment

by:Scott Thompson
ID: 38748907
What is the command that you are trying to use?  For some directories, you have to make sure you are using an Elevated Prompt.
0
 
LVL 19

Accepted Solution

by:
deroode earned 500 total points
ID: 38750066
How does your batch file determine where to store it's output? Can you post your batch or the part that does the storing?
0
 
LVL 16

Expert Comment

by:theo kouwenhoven
ID: 38750243
Did you realy try to save to C\temp\xyz?
if that is the case, add a colon C:\temp\xyz
0
 
LVL 5

Expert Comment

by:Imran Saeed
ID: 38750432
as deroode mentioned please post your batch file and let us have look at it.
0
 
LVL 25

Expert Comment

by:Lionel MM
ID: 38750680
If you have a command test.bat that does some things, and what you want to save it what you would see on screen then you can simply run the command
C:\Utils\Test.bat >C:\temp\xyz\Test.log
However if you want the results of the processes run in your file test.bat, let say a created file then as others have suggested please show us what those processes are.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
robocopy for today files 14 268
edit command in Command Prompt through Windows 10 2 145
USB backup batch file help needed. 9 121
Set variable with 'OR' logic possible? 12 16
VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question