I am new on this forum, I need help with a problem:
I have a folder with all kind of files and I have a list of some of these files.
Now I need to copy/move the files that are in the list to another directory.
Really would appriciate it, stuck on this for time already..
I have this:
Code: Select all
@echo off
set Source=C:\Users\MAs\Desktop\moving\PI
set Target=C:\Users\MAs\Desktop\moving\no
set FileList=C:\Users\MAs\Desktop\moving\not.txt
echo.
if not exist "%Source%" echo Source folder "%Source%" not found & goto Exit
if not exist "%FileList%" echo File list "%FileList%" not found & goto Exit
if not exist "%Target%" md "%Target%"
for /F "delims=" %%a in ('type "%FileList%"') do echo move "%Source%\%%a"
%Target%"
:Exit
echo.
echo press the Space Bar to close this window.
pause > nul
but this gives me an error:
'C:\Users\MAs\Desktop\moving\no"' is not recognized as an internal or external command, operable program of batch file
cheers