Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Modify a sring in a .bat file in multiple shares in a specific subfolder\file

$
0
0
Good Day all,

I created a script which will search for a servername in a drive mapping (NET USE command) in a specific folder and file on every user share and if found it will replace the old servername with the new servername.  It works perfectly if I specify the \\servername\sharename\common folder\common file.  I searched the forum and found a few pointers but I just can't get around it.

Here is the structure I am working with:

The script will read the source file Sharelist.txt until the EOF.  Here is the structure of the file:
\\servername\rootsharename1$
\\servername\rootsharename2$
\\servername\rootsharename3$ and so on.

Under the rootsharename are the usershares with the \common folder\common file.

ex:
\\servername\rootsharename1$\JohnD\NET\mapdrive.bat
\\servername\rootsharename1$\JoeB\NET\mapdrive.bat
\\servername\rootsharename1$\SamP\NET\mapdrive.bat
\\servername\rootsharename2$\BobT\NET\mapdrive.bat
\\servername\rootsharename2$\RickP\NET\mapdrive.bat and so on

I need help on how to get the script to go from one usershare to the other.

Thanks

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>