Creating copy of folder structue in two diffe

Lowel To go 98 tungsten light kit - cons...
February 5, 2010 at 00:11:05
Specs: Windows XP, 3.0
I Have “list .txt” that contains following folder structure which I need to copy,
LS001/m_m_001_01/m_001_01_01_co.fla
LS001/m_m_001_01/m_001_01_02_co.fla
LS001/m_m_001_01/m_001_01_03_co.fla
LS002/m_m_002_01/m_002_01_03_co.fla
LS002/m_m_002_07/m_002_07_03_co.fla
LS006/m_m_006_03/m_006_03_03_co.fla
Through batch process I want to make copy of this folder into two different folders like as below
Main is Root Folder in that
1st folder is,
bin/com/tis/ LS001/m_m_001_01/m_001_01_01_co.fla
bin/com/tis/ LS001/m_m_001_01/m_001_01_02_co.fla
.
… likewise till
bin/com/tis/ LS006/ m_m_006_03/m_006_03_03_co.fla

& 2nd folder,
src/com/tis/ LS001/m_m_001_01/m_001_01_01_co.fla
src/com/tis/ LS001/m_m_001_01/m_001_01_02_co.fla
.
… likewise till
src/com/tis/ LS006/ m_m_006_03/m_006_03_03_co.fla
Can anyone have any idea ?????????????????


See More: Creating copy of folder structue in two diffe

Report •

#1
February 5, 2010 at 04:03:00
Just like this ?

@echo off

for /F %%f in ('type test.txt') do (
echo copy %%f bin/com/tis
echo copy %%f src/com/tis
)


Report •

#2
February 7, 2010 at 21:50:24
Hi TVC,

I Have “list .txt” that contains following folder structure which I need to copy into Some another folders(that is it only contain location of few files here below i shown in directory format),

LS001/m_m_001_01/m_001_01_01_co.fla
LS001/m_m_001_01/m_001_01_02_co.fla
LS001/m_m_001_01/m_001_01_03_co.fla
LS002/m_m_002_01/m_002_01_03_co.fla
LS002/m_m_002_07/m_002_07_03_co.fla
LS006/m_m_006_03/m_006_03_03_co.fla

Through batch process I want to make copy of this folders into two different folders like as below

Main is Root Folder in that

1st folder is,
bin/com/tis/ inside this it will get copy LS001/m_m_001_01/m_001_01_01_co.fla
bin/com/tis/ inside this it will get copy LS001/m_m_001_01/m_001_01_02_co.fla
.
… likewise till
bin/com/tis/ inside this it will get copy LS006/ m_m_006_03/m_006_03_03_co.fla

& 2nd folder,
src/com/tis/ inside this it will get copy LS001/m_m_001_01/m_001_01_01_co.fla
src/com/tis/ inside this it will get copy LS001/m_m_001_01/m_001_01_02_co.fla
.
… likewise till
src/com/tis/ inside this it will get copy LS006/ m_m_006_03/m_006_03_03_co.fla

please let me know if u still confuse..
here what i try now but still not copying in directory doing somthing wrong ..

@echo off

setLocal EnableDelayedExpansion

xx=bin
call :mv
xx=src
call :mv
goto :eof

:mv
for /f %%a in (compile_schema.txt) do (
rem copy LS001\m_m_001_01\
rem %xx%\com\tis\LS001\m_m_001_01\
rem copy %%a %xx%/com/tis/%%a
xcopy ../bin/com/tis/*.*
)

pause


Report •

#3
February 8, 2010 at 05:07:42
Need to have a look ... but check this out:

if you use "enabledelayedexpansion" you may be required to use !variable! instead of %variable% everywhere INSIDE the FOR /F loop

Don't change the %%a variable though

It's a mess, but it works that way


Report •
Related Solutions


Ask Question