1.

Solve : How to copy all the files to a folder which has created using command ??

Answer»

ECHO TYPE THE DATE AND PRESS ENTER,
ECHO.
ECHO Enter date below in MMDD format now:

FOR /F "tokens=*" %%A IN ('TYPE CON') DO SET INPUT=%%A


z:
cd folder1\folder2

MD %input% (this is creating a folder with input data)

copy *%input%*.* Z:\folder1\folder2 (what i have to giver here to make all the files which i am copying using "copy *%input%*.*" this command to the folder which created with md %input%)Why are you doing this:

FOR /F "tokens=*" %%A IN ('TYPE CON') DO SET INPUT=%%A

... when you COULD do this:

set /p input="Enter date below in MMDD format now: "

... ?

If you want to copy all the files from this folder: Z:\folder1\folder2 to this folder: %input%

then do this:

copy "Z:\folder1\folder2\*.*" "%input%"









Thanks Salmon

move "Z:\folder1\folder2\*.*" "%input%"

this is working....



Discussion

No Comment Found