CMD or Powershell Moving - script not working

Stewox

New member
Member
Local time
11:15 PM
Messages
59
Code:
set LISTFOLDER=D:\List\
set FILESPATH=D:\Igre\COD-MW2\main\images
set DESTPATH=D:\Igre\COD-MW2\main\images\thepit

REM for /r %LISTFOLDER% %%I in (*.txt) do echo xcopy /qvs "%FILESPATH%\%%~nxI" "%DESTPATH%%%~pnxI"
for /r %LISTFOLDER% %%I in (*.txt) do xcopy /qvs "%FILESPATH%\%%~nxI" "%DESTPATH%%%~pnxI"

This script does not work.

The poster on another fourum said it could be a typo or something, but no further info was provided what the correct script is, although he had no errors, he mentioned it could be environment, I'm on win7 x64.

I have another similar script for filenames in a txt only, which appears to work, but it doesn't work because I have filespath in the txt, in the meantime i'll manually remove paths to see if it'll work with that, but still this script would be handy to save time in future.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Myself
OS
Windows 7 x64 Ultimate
CPU
Intel Core i7 3820
Motherboard
Asus P9X79
Memory
16GB DDR3 Corsair Vengeance 2133Mhz
Graphics Card(s)
Sapphire ATI Radeon 5850
Sound Card
Asus Xonar D1
Monitor(s) Displays
Asus VG278HE
Screen Resolution
1080p
Hard Drives
WD5000AAKS
WD1002FAEX
SSD128GB840PRO
PSU
Enermax AWT 620W Liberty DXX
Case
CM Storm Trooper
Cooling
Air
Keyboard
Sidewinder X4
Mouse
Sidewinder X8
Internet Speed
10/1
Antivirus
NOD32 v4
Browser
FF
I've got it working a bit more with filenames

Code:
@echo off

set FILELIST=D:\List\imageFilenames.txt
set FILESPATH=D:\Igre\COD-MW2\main\images
set DESTPATH=D:\Igre\COD-MW2\main\images\thepit

for /f %%X in (%FILELIST%) do call :COPY_FILES "%%X"
goto :eof

:COPY_FILES
for /r %FILESPATH% %%I in (%~1) do xcopy /qvs "%%I" "%DESTPATH%%%~pnxI"

But the error is

"cannot perform cyclic copy"
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Myself
OS
Windows 7 x64 Ultimate
CPU
Intel Core i7 3820
Motherboard
Asus P9X79
Memory
16GB DDR3 Corsair Vengeance 2133Mhz
Graphics Card(s)
Sapphire ATI Radeon 5850
Sound Card
Asus Xonar D1
Monitor(s) Displays
Asus VG278HE
Screen Resolution
1080p
Hard Drives
WD5000AAKS
WD1002FAEX
SSD128GB840PRO
PSU
Enermax AWT 620W Liberty DXX
Case
CM Storm Trooper
Cooling
Air
Keyboard
Sidewinder X4
Mouse
Sidewinder X8
Internet Speed
10/1
Antivirus
NOD32 v4
Browser
FF
Guess I had to choose another drive for destination directory.

Although a small issue persists, the thing is asking whether the path is a directory or filename for each file, slows the process down considerably.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Myself
OS
Windows 7 x64 Ultimate
CPU
Intel Core i7 3820
Motherboard
Asus P9X79
Memory
16GB DDR3 Corsair Vengeance 2133Mhz
Graphics Card(s)
Sapphire ATI Radeon 5850
Sound Card
Asus Xonar D1
Monitor(s) Displays
Asus VG278HE
Screen Resolution
1080p
Hard Drives
WD5000AAKS
WD1002FAEX
SSD128GB840PRO
PSU
Enermax AWT 620W Liberty DXX
Case
CM Storm Trooper
Cooling
Air
Keyboard
Sidewinder X4
Mouse
Sidewinder X8
Internet Speed
10/1
Antivirus
NOD32 v4
Browser
FF
Back
Top