Please give the option to copyfile or movefile from an UNC address, if it is not yet available.
In the meantime, is there a workaround? or to map a network drive using code?
Thanks
Using UNC address
Moderators: Dorian (MJT support), JRL
There was an example of UNC usage posted to the old mailing list by Peter Turner, using VBScript, and it could probably be tweaked to check for failed mappings too.In the meantime, is there a workaround? or to map a network drive using code?
For now, here's a very simple workaround.
Let>sDrive=u:
Let>sUNCPath=\\otherpc\SHARENAME
Rem>Connect
Run>net use %sDrive% %sUNCPath%
Rem>Copy commands here
Rem>Disconnect
Run>net use %sDrive% /delete
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
A workaround is not needed. I use CopyFile every night to do backups using UNC to get copy files from about 10 workstations to one backup location. I actually have a comment line in the script to ONLY use UNC for Drive letters.In the meantime, is there a workaround?
Here are some excerpted lines from a routine that does backup of Outlook files. (not a complete functioning routine, just some sample UNC lines ). When Outlook profiles are set up, each PST file is named with the login name of the user, example: outlook_bob.pst. This allows all copies of Outlook files to be kept in one folder if desired.
=================================//List of various sources of Outlook files
//Only use UNC names for Drive IDs
Let>Source=\\22OFFICE_2\C\Windows\Application Data\Microsoft\Outlook\outlook_%Name%.pst
Let>Source=\\SERVER\C_DRIVE\Users\%Name%\outlook_%Name%.pst
Let>DestinationPath=\\OFFICE2\C_DRIVE\Bob\Backups
Let>Destination=%DestinationPath%
Concat>Destination,\%Name%\outlook_%Name%.pst
CopyFile>%Source%,%Destination%
You can use the NET USE commands to do your mapping.or to map a network drive using code?
Go to a Command Prompt window and enter NET USE /? for syntax.
Use Run Program> to execute the NET USE commands.
Hope this helps
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!