We are migrating users from Novell server to Microsoft and we must preserve their drive mappings.
I have a spreadsheet which lists between say 1 and 75 user names. I have drive mapping files associated with most user names that indicates which drive mappings the user has set up on their machine. I would like from Excel to (the cell addresses and directory names are little changed from actual specific needs):
1. Create a batch file which takes the user names starting from cell D47 say up to cell D122 appends ".txt" to the end of the user name.
2. The batch file would then look for a text file by by each user name in the say H:\DriveMappings Directory and concatenates all the text files in one file say "all.txt." This process should not stop if Excel can't find a file with the name of say username1.txt, but should just continue to the next one.*
3. Lastly the macro should paste this into say cell K251 by way of the text import wizard and to use spaces and colons (":") to parse the data into 3 columns while leaving the the 4th and 5th column un-imported, since these columns contain non-essential inofrmation such as "Netware" or "Microsoft Server." *
*I just found out that a copy command could work for the concatenation, for instance:
H:\>copy pinchpa.txt+sortgr.txt+h235gz1.txt all.txt
However this command seems to fail if "DOS" can't find one of the files.
**Note, each drive line is preceded in the drive mapping file by the user names so it would be in the in the form:
pinchpa H: \\change05.net.company.org\gz_inc Netware
pinchpa I: \\change05.net.company.org\st_inc Microsoft Server
pinchpa S: \\change05.net.company.org\gz_inc_shared
etc.
Thanks much for any help!
It is not necessary for the colon to remain in the final data.
2006-08-18
03:39:37
·
2 answers
·
asked by
socrtwo
3
in
Computers & Internet
➔ Programming & Design