purpleglow
New member
- Local time
- 12:57 AM
- Messages
- 6
I've got some experience doing some basic batch scripting earlier, but it seems that this one is just too advanced for me.
I should create a script that copies one file (should be given as argument) from specific location to another and keeps the directory structure which is deeper than some specific folder of the source path. Let me explain this a bit more:
The destination folder is something like:
x:\stuff\
ex 1. If the source file is in x:\some\thing\stuff\test\file.txt, the file is copied to x:\stuff\test\file.txt
ex 2. If the source file is in x:\some\thing\stuff\test\test2\file.txt, the file is copied to x:\stuff\test\test2\file.txt
of course if those folders 'test' and 'test2' don't exit in the destination folder they are created.
how I get the path after the 'stuff' folder and put it into the destination path? for example in ex. 1, how do get the '\test\file.txt' and put it to the destination path like this: x:\stuff\test\file.txt
Thanks!
I should create a script that copies one file (should be given as argument) from specific location to another and keeps the directory structure which is deeper than some specific folder of the source path. Let me explain this a bit more:
The destination folder is something like:
x:\stuff\
ex 1. If the source file is in x:\some\thing\stuff\test\file.txt, the file is copied to x:\stuff\test\file.txt
ex 2. If the source file is in x:\some\thing\stuff\test\test2\file.txt, the file is copied to x:\stuff\test\test2\file.txt
of course if those folders 'test' and 'test2' don't exit in the destination folder they are created.
how I get the path after the 'stuff' folder and put it into the destination path? for example in ex. 1, how do get the '\test\file.txt' and put it to the destination path like this: x:\stuff\test\file.txt
Thanks!
My Computer
- OS
- Windows 7 Enterprise x86