We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,916 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Variable > Output > Log

when trying to output the string of a variable to a text file, the string try's to run and therefore pops up like this,

%localDrive% 2>>fileCompare.log

'C:\' is not recognized as an internal or external command,
operable program or batch file.

Any ideas?

2
Contributors
2
Replies
1 Week
Discussion Span
10 Months Ago
Last Updated
3
Views
Doogledude123
Junior Poster in Training
90 posts since Jun 2012
Reputation Points: 0
Solved Threads: 7
Skill Endorsements: 0

Why not try:

C:/> echo %localDrive% 2>fileCompare.log

echo in batch is good for writing to files.

HTMLperson5
Deleted Member

Sorry, I realized that does not work at times....

Try executing: echo %localDrive%>fileCompare.log and it should work perfectly

HTMLperson5
Deleted Member

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0637 seconds using 2.63MB