Ok so strDest was wrong
strDest = "\\sql1\Backups\PST\" & varUserName & "\"
Should look like that.
But I’m not sure what you mean by check the content of strTemp?
Should it already have an entry in the registry? Because that’s something I don’t want to have to do… walk around to everyone’s...
Thanks for all your help mate, it’s very much appreciated… yeah this still didn’t work
Does this look right to you??
Set WshShell = CreateObject("Wscript.Shell")
varUserName = WshShell.ExpandEnvironmentStrings("%username%")
If CStr(strDay) = CStr(Weekday(Now())) Then
'Reads key from...
Hey PHV… I tried your script as
Set WshShell = CreateObject("Wscript.Shell")
varUserName = WshShell.ExpandEnvironmentStrings("%username%")
If CStr(strDay) = CStr(Weekday(Now())) Then
'Reads key from registry to see if we have already backed up today
strTemp =...
Hey PHV… I tried your script as
Set WshShell = CreateObject("Wscript.Shell")
varUserName = WshShell.ExpandEnvironmentStrings("%username%")
If CStr(strDay) = CStr(Weekday(Now())) Then
'Reads key from registry to see if we have already backed up today
strTemp =...
Thanks PHV... that seems to have worked... well as long as I don’t use the \" & varUserName & "\
If I explicitly specify my username work fine… but I need to it to be username agnostic.
Any ideas??
Thanks, everyone’s as awesome help round here?
Hey, thanks... i did but the "to" path...
ON Error Resume Next
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile "C:\Documents and Settings\" & varUserName & "\Local Settings\Application Data\Microsoft\Outlook\*.pst" , "\\sql1\Backups\PST\shanet"
that's why i say that...
Hey all… needing a little help… I have just started creating a script to back up .PST files to a central location. I’m going to start simple and build it up to do all that I need. But I can’t even get past the copy location, if I use;
objFSO.CopyFile "C:\Documents and Settings\" & varUserName &...
OK well now if I try to make it user agnostic by introducing the " & varUserName & " variable (is that what’s it called?) That’s it dies and wont copy… am I missing something that will work for a simple scrip but won’t recognize something more complex??
ON Error Resume Next
Set objFSO =...
I am following another script covering this… but my file path seems to be wrong. It just wont work and I’m not sure why.
ON Error Resume Next
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile "C:\Documents and Settings\shanet\Local Settings\Application...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.