Link to home
Start Free TrialLog in
Avatar of AmmarDJ
AmmarDJ

asked on

CMD batch file.

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-
Avatar of Scott Thompson
Scott Thompson
Flag of United States of America image

What is the command that you are trying to use?  For some directories, you have to make sure you are using an Elevated Prompt.
ASKER CERTIFIED SOLUTION
Avatar of deroode
deroode
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Did you realy try to save to C\temp\xyz?
if that is the case, add a colon C:\temp\xyz
as deroode mentioned please post your batch file and let us have look at it.
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.