Batch file with variables
Posted: 14 Mar 2008 12:11
What I'm trying to do is create a batch file that will take the highest numbered file
eg.
Directory containing the files
Image 8.jpg
Image 9.jpg
Image 10.jpg
Image 11.jpg
and I want the batch to take the highest numbered file, in this case Image 11.JPG and move it to a new directory, then delete the rest. I have used xcopy in the form
XCOPY "C:\Test\Image *.jpg" "C:\Imaged\TEST.jpg /y
and it does exactly what I want, except it gives me a prompt if I want it as a (d)directory or (f)file? and I have to manually type F in order for it to complete, I need it to be totally automated. Any help is greatly appretiated!
eg.
Directory containing the files
Image 8.jpg
Image 9.jpg
Image 10.jpg
Image 11.jpg
and I want the batch to take the highest numbered file, in this case Image 11.JPG and move it to a new directory, then delete the rest. I have used xcopy in the form
XCOPY "C:\Test\Image *.jpg" "C:\Imaged\TEST.jpg /y
and it does exactly what I want, except it gives me a prompt if I want it as a (d)directory or (f)file? and I have to manually type F in order for it to complete, I need it to be totally automated. Any help is greatly appretiated!