Accu Backup
2023-03-21 19:08:44 UTC
I'm trying to output a list of all .txt and .csv files located within a certain directory and all its subdirectories. On Windows Server 2019, I'm running...
C:\>dir "e:\shareddata\folder1\folder2" \*.txt \*.csv \s \b > "c:\users\username\desktop\output.txt"
or similar variants and getting mixed results. When I have the \s included, I am getting ALL files... not just the ones I want. I also got only the wanted files but on the entire drive... not just from the folder I need. What am I missing here? My goal is to review the list of files and then use a similar batch to delete them if there is nothing I need to keep. Thanks.
C:\>dir "e:\shareddata\folder1\folder2" \*.txt \*.csv \s \b > "c:\users\username\desktop\output.txt"
or similar variants and getting mixed results. When I have the \s included, I am getting ALL files... not just the ones I want. I also got only the wanted files but on the entire drive... not just from the folder I need. What am I missing here? My goal is to review the list of files and then use a similar batch to delete them if there is nothing I need to keep. Thanks.