HostWeb Forums » Microsoft Server Operating Systems » microsoft.public.win2000.cmdprompt.admin » how to simplify my command for backup purpose
Topic: how to simplify my command for backup purpose
src
|_____folder1
|_____folder2
|_____folder3
|
.
._____*.dll
._____*.exe
._____*.otherformat
i need copy to the target, the struct of the target folder should be
like this:
target
|______folder1
|______folder2
|______folder3
|______*.dll
|______*.exe
everything under folder1,folder2,folder3 should be copied
right now i use following command:
<<<<<<<<<<<<<<<<<
for /D %%i in (%SourceDir%\*.*) do @(
mkdir %TargetDir%\%%~ni
xcopy %%i %TargetDir%\%%~ni /e /s /y /i /q )
xcopy %SourceDir%\*.dll %TargetDir% /y /i /q
xcopy %SourceDir%\*.exe %TargetDir% /y /i /q
>>>>>>>>>>>>>>>>>
i could copy them seperately, but i'm sure there must be some better
way to achieve this, can anyone teach how?
Replies below ↓
Replies
how to simplify my command for backup purpose
src
|_____folder1
|_____folder2
|_____folder3
|
.
._____*.dll
._____*.exe
._____*.otherformat
i need copy to the target, the struct of the target folder should be
like this:
target
|______folder1
|______folder2
|______folder3
|______*.dll
|______*.exe
everything under folder1,folder2,folder3 should be copied
right now i use following command:
<<<<<<<<<<<<<<<<<
for /D %%i in (%SourceDir%\*.*) do @(
mkdir %TargetDir%\%%~ni
xcopy %%i %TargetDir%\%%~ni /e /s /y /i /q )
xcopy %SourceDir%\*.dll %TargetDir% /y /i /q
xcopy %SourceDir%\*.exe %TargetDir% /y /i /q
>>>>>>>>>>>>>>>>>
i could copy them seperately, but i'm sure there must be some better
way to achieve this, can anyone teach how?
how to simplify my command for backup purpose
src
|_____folder1
|_____folder2
|_____folder3
|
.
._____*.dll
._____*.exe
._____*.otherformat
i need copy to the target, the struct of the target folder should be
like this:
target
|______folder1
|______folder2
|______folder3
|______*.dll
|______*.exe
everything under folder1,folder2,folder3 should be copied
right now i use following command:
<<<<<<<<<<<<<<<<<
for /D %%i in (%SourceDir%\*.*) do @(
mkdir %TargetDir%\%%~ni
xcopy %%i %TargetDir%\%%~ni /e /s /y /i /q )
xcopy %SourceDir%\*.dll %TargetDir% /y /i /q
xcopy %SourceDir%\*.exe %TargetDir% /y /i /q
>>>>>>>>>>>>>>>>>
i could copy them seperately, but i'm sure there must be some better
way to achieve this, can anyone teach how?
how to simplify my command for backup purpose
src
|_____folder1
|_____folder2
|_____folder3
|
.
._____*.dll
._____*.exe
._____*.otherformat
i need copy to the target, the struct of the target folder should be
like this:
target
|______folder1
|______folder2
|______folder3
|______*.dll
|______*.exe
everything under folder1,folder2,folder3 should be copied
right now i use following command:
<<<<<<<<<<<<<<<<<
for /D %%i in (%SourceDir%\*.*) do @(
mkdir %TargetDir%\%%~ni
xcopy %%i %TargetDir%\%%~ni /e /s /y /i /q )
xcopy %SourceDir%\*.dll %TargetDir% /y /i /q
xcopy %SourceDir%\*.exe %TargetDir% /y /i /q
>>>>>>>>>>>>>>>>>
i could copy them seperately, but i'm sure there must be some better
way to achieve this, can anyone teach how?
how to simplify my command for backup purpose
src
|_____folder1
|_____folder2
|_____folder3
|
.
._____*.dll
._____*.exe
._____*.otherformat
i need copy to the target, the struct of the target folder should be
like this:
target
|______folder1
|______folder2
|______folder3
|______*.dll
|______*.exe
everything under folder1,folder2,folder3 should be copied
right now i use following command:
<<<<<<<<<<<<<<<<<
for /D %%i in (%SourceDir%\*.*) do @(
mkdir %TargetDir%\%%~ni
xcopy %%i %TargetDir%\%%~ni /e /s /y /i /q )
xcopy %SourceDir%\*.dll %TargetDir% /y /i /q
xcopy %SourceDir%\*.exe %TargetDir% /y /i /q
>>>>>>>>>>>>>>>>>
i could copy them seperately, but i'm sure there must be some better
way to achieve this, can anyone teach how?