Batch file to move files to another directory
/q isn't a valid parameter. /y: Suppresses prompting to confirm overwriting
Also ..\txt means directory txt under the parent directory, not the root directory. The root directory would be: \ And please mention the error you get
Try:
move files\*.txt \
Edit: Try:
move \files\*.txt \
Edit 2:
move C:\files\*.txt C:\txt
Suppose there's a file test.txt
in Root Folder, and want to move it to \TxtFolder
,
You can try
move %~dp0\test.txt %~dp0\TxtFolder
.
reference answer: relative path in BAT script
Try:
move "C:\files\*.txt" "C:\txt"