Creating a bunch of junctions...
Posted: 25 Jan 2012 20:17
I know that command #271 allows that, but I'm trying to do something slightly different.
I have a folder (let's call it A) with three subfolders, and another folder (B) with a bunch of subfolders. Every subfolder has its own unique name. And I'd like to create in B three junctions, each one pointing to one of A subfolder. Each junction having the same name of the subfolder it points to, as well as the attributes.
Running the command xcopy I'm able to copy the three subfolders without their contents (actually obtaining three empty folders in B, copies of their A counterparts), and with another cli utility (sysinternal's junction) I can turn them in junctions.
The problem I'm facing is due to the filenames. My first approach (via windows batch file) suggests that I should run some sort of for loop through the three folders in A, getting for each its name, and then "constructing" the proper paths to feed as parametres in the cli's mentioned above.
I'd like to know if this is easier to accomplish via XY's script engine or MS batch file system.
And yes, I know that at first it may seem an "oversized" approach for just three folders, but that's something that would be repeated quite frequently, hence the search for an automatized way.
TIA.
I have a folder (let's call it A) with three subfolders, and another folder (B) with a bunch of subfolders. Every subfolder has its own unique name. And I'd like to create in B three junctions, each one pointing to one of A subfolder. Each junction having the same name of the subfolder it points to, as well as the attributes.
Running the command xcopy I'm able to copy the three subfolders without their contents (actually obtaining three empty folders in B, copies of their A counterparts), and with another cli utility (sysinternal's junction) I can turn them in junctions.
The problem I'm facing is due to the filenames. My first approach (via windows batch file) suggests that I should run some sort of for loop through the three folders in A, getting for each its name, and then "constructing" the proper paths to feed as parametres in the cli's mentioned above.
I'd like to know if this is easier to accomplish via XY's script engine or MS batch file system.
And yes, I know that at first it may seem an "oversized" approach for just three folders, but that's something that would be repeated quite frequently, hence the search for an automatized way.
TIA.