I'm trying to parallelise a script im using to backup some files using TSM.
Basically I run the following commands:
net use y: \\Server\share
dsmc incr y: -optfile="c:\path\folder\optionfile.opt" > c:\logs\logfile
.. and TSM backus up the entire directory tree in serial.
But I want to do this to create some seperate scripts to use more than one client to backup subsets of the directory tree (to speed things up)
FOR each subdirectory in \\Server\share
IF not processed 1/3 of the directories in \\server\share
DO
net use y: \\Server\share\**<append subdirectory here>**
Backup y
This is what I've got so far:
FOR /D %%a IN (W:) DO (
net use y: \\server\share\%%a
run command to backup y:
(y:\ should be now \server\share\first_dir_name)
net use y: /delete
timeout /t 10
)
I still need the if logic to count the number of folders in the share.
The first step was to find how many top level sub directories are in the share:
I use dir /a:d /s /b "Folder Path" | find /c ":\" but the command never completes.
Hope that makes sense!
Thanks.