Solved

CMD batch file.

Posted on 2013-01-06
5
414 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

756 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