[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.inetserver.asp.db

cheap michael kors outlet h o A

Katadedajab

12/23/2013 6:17:00 PM

<a href=http://www.oakhillreddevilalumni.org/latest-mk.html><b&... kors outlet</b></a>I really was able to find this information useful. Thanks also posting element.I have been having going to be the same problems that all your family members described in your happy I was naive at first and approved many kind comments that I shouldn¡¯t including before I figured a number of people were do nothing more than taking advantage along the lines of my hand.<a href=http://www.airrepaironline.com/michael-kors.html><... michael kors outlet</b></a>Thank all your family members an all in one piece of land as well as for sharing this allowing you to have all including our way of life you actually recognise what you are speaking about! Bookmarked. Kindly also discuss providing some one my own personal website = We will have an all in one link exchange arrangement between us<a href=http://www.houghtonlakeboard.org/wholesale-mk.html><b&... kors outlet</b></a>When your family make an appointment with this article,all your family members will be the case delighted as mad this just how long,all your family members are full of curiosity,all your family can be able to get more and more cheap bells and whistles all over the this site,tends to be that definitely and there quality, before I bought.<a href=http://www.oakhillreddevilalumni.org/latest-mk.html><b&... kors purses outlet</b></a>Finish visit this phrases and words,an all in one mountain and rivers have things you can do scene appeared in your front like my hand Like that feeling ach and every much in the way only hope for more information on have the time can come to mind to educate yourself regarding what better way going to be the relaxing pleasure along the lines of are you feeling and mind.<a href=http://www.houghtonlakeboard.org/wholesale-mk.html><b&... kors outlet</b></a>If you comes back then he or she often really yours. If you doesn't, wish him best of the best There would be the fact just nobody who loves him a good deal more than you Never despair.<a href=http://www.oakhillreddevilalumni.org/latest-mk.html><b&... kors bags outlet</b></a>
1 Answer

Pegasus \(MVP\)

7/3/2008 4:14:00 PM

0


"Lord Dark Helmet" <LordDarkHelmet@discussions.microsoft.com> wrote in
message news:83EF02D7-5E87-44A7-9DC6-CA23BFAC5039@microsoft.com...
> "Tom Lavedas" wrote:
>
>> On Jul 2, 3:43 pm, Lord Dark Helmet
>> <LordDarkHel...@discussions.microsoft.com> wrote:
>> > I am attempting to copy some custom Office Templates into user profiles
>> > when
>> > they log on to the computer. I want it to look to see if the files
>> > exist and
>> > if they don't then copy the files from a network share. Here is the
>> > Code I
>> > have come up with.
>> >
>> > path=CreateObject("WScript.Shell").ExpandEnvironmentStrings("%UserProfile%\Application
>> > Data\Microsoft\Templates\")
>> > dim objFSO
>> > set objFSO=CreateObject("Scripting.FileSystemObject")
>> > If objFSO.FileExists("path") = False Then
>> > objFSO.CopyFile "\\servername\stdapps\custemp\*.docx", path
>> > End If
>> >
>> > I am getting an error file not found on line 5 character 1 code
>> > 800A0035.
>> > I've checked and templates are there. Any ideas?
>> >
>> > Any Help would be greatly appreciated
>>
>> First, take the quotes from around the variable's name in line five.
>> With the quotes, you are passing the literal string, path, to the
>> FileExists method.
>>
>> Once you fix that, a second problem will arise; specifically, you are
>> passing a folder's path to a function that can only test for a file.
>> If you want to test for the presence of the folder, then change the
>> request to FolderExists, instead. However, I don't think that's what
>> you want either, because if it were the absence of the folder you were
>> checking, the next step when it returned False would be to create the
>> folder - which you are not doing.
>>
>> So, which is it? File or folder?
>>
>> If it's the absence of the folder that it to trigger the action, then
>> try this ...
>>
>> path=CreateObject("WScript.Shell")_
>> .ExpandEnvironmentStrings("%UserProfile%") _
>> & "\Application Data\Microsoft\Templates")
>> dim objFSO
>> set objFSO=CreateObject("Scripting.FileSystemObject")
>> If objFSO.FolderExists(path) = False Then
>> objFSO.CreateFolder path
>> objFSO.CopyFile "\\servername\stdapps\custemp\*.docx", path & "\"
>> End If
>>
>> Tom Lavedas
>> ===========
>> http://members.cox.net/tgl...
>>
>
> OK I have made some adjustments that you have suggested. What I want it
> to
> do is scan this folder and see if three files exhist and if they don't
> copy
> these files into this folder. So I have changed the code to look in this
> location for the time being one of the three files. If it doesn't exhist
> then copy the correct file there. Here is the code I have now.
>
> Option Explicit
> dim path
> path=CreateObject("WScript.Shell").ExpandEnvironmentStrings("%UserProfile%\Application
> Data\Microsoft\Templates\")
> dim objFSO
> set objFSO=CreateObject("Scripting.FileSystemObject")
> If objFSO.FileExists(path"\envelope.dotx") = False Then
> objFSO.CopyFile "\\servername\stdapps\custemp\envelope.docx", path & "\"
> End If
>
>
> I am now receiving the following error:
> Expected ')'
> Line 6
> char 26
> Code 800A03EE.
>
> Thanks again for all your help.
>

In the line

If objFSO.FileExists(path"\envelope.dotx") = False Then

you're trying to concatenate the variable 'path' with the string
'\envelope.dotx'. This is fine for batch files but not so fine for
VB Scripts. To concatenate strings in VB Scripts, use the &
operator:

If objFSO.FileExists(path & "envelope.dotx") = False Then

Note also that you have one backslash too many. If 'path' ends
on a backslash then you must not start '\envelope.dotx' with
a backslash. The same goes for Line 7.