3
I am making a batch script to move files based on their extension, so for example:
video.avi would go to Videos
text.txt would go to text files
I am using the drag and drop technique of getting the file path:
move %1 directory
how can I use if statements etc to test whether the file has a certain extension?
What I tried was:
if %1==*.txt (move to text files)
In any replies I get, could you please keep the answer generic (ie have (extension) instead of .txt) as I want to understand more easily
Thanks in advance
Possible duplicate of Move a file to archive folder in cmd using wildcards and How does the Windows RENAME command interpret wildcards?
– jww – 2018-10-07T21:03:43.297