4 pages: [1] [2] [3] [4]
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

Reply | New Topic | This is SPAM | This is Offensive

Submitted: 5/24/2008 1:06:54 AM

By: thinktwice
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

Reply | New Topic | This is SPAM | This is Offensive

Submitted: 5/24/2008 1:06:54 AM

By: thinktwice

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?


Reply | New Topic | This is SPAM | This is Offensive

Submitted: 5/24/2008 1:06:54 AM

By: thinktwice

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?


Reply | New Topic | This is SPAM | This is Offensive

Submitted: 5/24/2008 1:06:54 AM

By: thinktwice

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?


Reply | New Topic | This is SPAM | This is Offensive

Submitted: 5/24/2008 1:06:54 AM

By: thinktwice

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?


Contents
Home
Forums
About Us
Contact Us
Web Hosting:
Hosting Providers
How to choose a name
What is a Hosting Provider
Hosting Types
Choosing the right plan
 
Search
 
Login to HostWeb.com
Email
Password
If you do not have an account with us yet, join now - it's FREE!