windows - Batch file with simple FC command runs forever -
why simple batch file run forever printing out only line inside .bat file on , over
my fc.bat file contents
fc "%userprofile%\desktop\file1.txt" "%userprofile%\desktop\file2.txt"
my desktop dir/
fc.bat file1.txt file2.txt!
here image of cmd prompt after double clicking fc.bat
output is
... c:\users\a\desktop>fc "%userprofile%\desktop\file1.txt" "%userprofile%\desktop\file2.txt" c:\users\a\desktop>fc "%userprofile%\desktop\file1.txt" "%userprofile%\desktop\file2.txt" c:\users\a\desktop>fc "%userprofile%\desktop\file1.txt" "%userprofile%\desktop\file2.txt" c:\users\a\desktop>fc "%userprofile%\desktop\file1.txt" "%userprofile%\desktop\file2.txt" c:\users\a\desktop>fc "%userprofile%\desktop\file1.txt" "%userprofile%\desktop\file2.txt" c:\users\a\desktop>fc "%userprofile%\desktop\file1.txt" "%userprofile%\desktop\file2.txt" c:\users\a\desktop>fc "%userprofile%\desktop\file1.txt" "%userprofile%\desktop\file2.txt" c:\users\a\desktop>fc "%userprofile%\desktop\file1.txt" "%userprofile%\desktop\file2.txt" c:\users\a\desktop>fc "%userprofile%\desktop\file1.txt" "%userprofile%\desktop\file2.txt" ...
it looks batch file in infinite loop calls on , on again.
fc "%userprofile%\desktop\file1.txt" "%userprofile%\desktop\file2.txt"
that calling fc.bat, running same command. default, batch files print out line of code run, why seeing output.
Comments
Post a Comment