How do I set a batch file .txt output save location
Go to solution
Solved by Helibert,
@echo off dir /b /s Movies\*.* > list1.txt for /f "tokens=*" %%A in (list1.txt) do echo %%~nxA >> movieslist.txt del list1.txt
instead of changing the path just use the path in the dir command itself.
First line creates a temporary list.txt with all files with full path recursively in the specified path .
Second line does a for loop over every entry an only prints the filename instead of the full path
third line deletes the temporary file
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now