Solved

CMD batch file.

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

Expert Comment

by:lionelmm
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Using dates in 'DOS' batch files has always been tricky as it has no built in ways of extracting date information.  There are many tricks using string manipulation to pull out parts of the %date% variable or output of the date /t command but these r…
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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

911 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now