-3

For my batch file I need to do a few different things...I have completed steps 1-3

1) Perform a dir search and save the result of that search in a variable
2) Set the destination path as a variable
3) Copy the source file to the destination path

My code so far :

@echo off
cls
cd /d D:\Downloads\Videos
set "flshvid=&dir *flash*.mkv /s /b"
set "flshdir=O:\Aayush\Videos\TV Shows\The Flash\Season 3"
xcopy %flshvid% %flshdir%

Why doesn't this code work? Any help is appreciated. Thanks in advance!

br1ttle
  • 11
  • 3

1 Answers1

0

Environment variables may not start with a numeric because %n where n is 0..9 refers to the serial parameter number provided to the routine.

replace 1 and 2 with variable names that do not start with a numeric

Magoo
  • 77,302
  • 8
  • 62
  • 84