Executing ls command from a batch file
Posted: Thu Nov 21, 2019 2:33 am
I'm struggling with trying to execute the ls command from a CMD file to run as a batch job. Specifically, I'm trying to direct output to a text file.
This is on Windows 10 Pro. Here's what I've been trying but to no avail.
@ECHO ON
CLS
SETLOCAL ENABLEEXTENSIONS
"C:\Program Files\Primo Ramdisk\rxprd.exe" ls > c:\temp\myfileinfo.txt
Pause
EXIT
Any suggestions would be welcomed! Note, I can manually open a command window and run the command rxprd.exe > c:\temp\myfileinfo.txt and it works fine.
Phil
This is on Windows 10 Pro. Here's what I've been trying but to no avail.
@ECHO ON
CLS
SETLOCAL ENABLEEXTENSIONS
"C:\Program Files\Primo Ramdisk\rxprd.exe" ls > c:\temp\myfileinfo.txt
Pause
EXIT
Any suggestions would be welcomed! Note, I can manually open a command window and run the command rxprd.exe > c:\temp\myfileinfo.txt and it works fine.
Phil