I'm trying to clean up a few file shares, and I have the list of folders I'm trying to move in a CSV file.
values in delfromtest.csv are
Test1
Test2
test3
I'm attempting to use this.
FOR /F "tokens=1" %%A IN (C:\delfromtest.csv) DO (
if EXIST %Drive%:\%%~A (set asset=%%~A%)
move "%drive%:\images%drive%\%asset%" "%drive%:\images%drive%\Do not Migrate%drive%\%asset%"
)
this outputs
move "v:\imagesv\C:\delfromtest.csv" "v:\imagesv\Do not Migratev\C:\delfromtest.csv"
but if I remove the entire move command from the loop, the variables are output as desired.