![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Copy File to users home drives if a certain file exists Can anyone hlep me creating a VBSCRIPT that will go folders on a network drive and copy a file (shortcut, .lnk file) to that directory? Any help would be greatly appreciated. thnx, tm |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Copy File to users home drives if a certain file exists "Dolfan849" <Dolfan849@newsgroup> wrote in message news:9552D10D-9E03-4D7B-A2E8-2926655465E6@newsgroup Quote: > Can anyone hlep me creating a VBSCRIPT that will go folders on a network > drive and copy a file (shortcut, .lnk file) to that directory? Any help > would be greatly appreciated. > > thnx, > tm can see the full details, including an example, in the help file script56.chm, which you can download from the Microsoft site. Alternatively you might want to create a batch file and use the "copy" command. |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Copy File to users home drives if a certain file exists I can copy the shortcut/files but I am not sure how to get a script to run through all the files to check if a certain file is there before I copy it. Do you have the link for the copyfile method? Thanks for your help. tm "Pegasus [MVP]" wrote: Quote: > > "Dolfan849" <Dolfan849@newsgroup> wrote in message > news:9552D10D-9E03-4D7B-A2E8-2926655465E6@newsgroup Quote: > > Can anyone hlep me creating a VBSCRIPT that will go folders on a network > > drive and copy a file (shortcut, .lnk file) to that directory? Any help > > would be greatly appreciated. > > > > thnx, > > tm > Did you have a look at the CopyFile method of the File System Object? You > can see the full details, including an example, in the help file > script56.chm, which you can download from the Microsoft site. Alternatively > you might want to create a batch file and use the "copy" command. > > > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Copy File to users home drives if a certain file exists Here are the examples you're after, copied straight from script56.chm:Function ReportFileStatus(filespec) Dim fso, msg Set fso = CreateObject("Scripting.FileSystemObject") If (fso.FileExists(filespec)) Then msg = filespec & " exists." Else msg = filespec & " doesn't exist." End If ReportFileStatus = msg End FunctionFileSystemObject.CopyFile "c:\mydocuments\letters\*.doc", "c:\tempfolder\""Dolfan849" <Dolfan849@newsgroup> wrote in message news:4E662FED-AD55-4E98-A591-70F234C34AB8@newsgroup>I can copy the shortcut/files but I am not sure how to get a script to run Quote: > through all the files to check if a certain file is there before I copy > it. > Do you have the link for the copyfile method? Thanks for your help. > > tm > > "Pegasus [MVP]" wrote: > Quote: >> >> "Dolfan849" <Dolfan849@newsgroup> wrote in message >> news:9552D10D-9E03-4D7B-A2E8-2926655465E6@newsgroup Quote: >> > Can anyone hlep me creating a VBSCRIPT that will go folders on a >> > network >> > drive and copy a file (shortcut, .lnk file) to that directory? Any >> > help >> > would be greatly appreciated. >> > >> > thnx, >> > tm >> Did you have a look at the CopyFile method of the File System Object? You >> can see the full details, including an example, in the help file >> script56.chm, which you can download from the Microsoft site. >> Alternatively >> you might want to create a batch file and use the "copy" command. >> >> >> |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Copy File to users home drives if a certain file exists No to ask a dumb question, where is script56 located? I wasn't sure where the example scripts are listed. thnx, tm "Pegasus [MVP]" wrote: Quote: > Here are the examples you're after, copied straight from > script56.chm:Function ReportFileStatus(filespec) > Dim fso, msg > Set fso = CreateObject("Scripting.FileSystemObject") > If (fso.FileExists(filespec)) Then > msg = filespec & " exists." > Else > msg = filespec & " doesn't exist." > End If > ReportFileStatus = msg > End FunctionFileSystemObject.CopyFile "c:\mydocuments\letters\*.doc", > "c:\tempfolder\""Dolfan849" <Dolfan849@newsgroup> wrote in > message news:4E662FED-AD55-4E98-A591-70F234C34AB8@newsgroup>I can > copy the shortcut/files but I am not sure how to get a script to run Quote: > > through all the files to check if a certain file is there before I copy > > it. > > Do you have the link for the copyfile method? Thanks for your help. > > > > tm > > > > "Pegasus [MVP]" wrote: > > Quote: > >> > >> "Dolfan849" <Dolfan849@newsgroup> wrote in message > >> news:9552D10D-9E03-4D7B-A2E8-2926655465E6@newsgroup > >> > Can anyone hlep me creating a VBSCRIPT that will go folders on a > >> > network > >> > drive and copy a file (shortcut, .lnk file) to that directory? Any > >> > help > >> > would be greatly appreciated. > >> > > >> > thnx, > >> > tm > >> > >> Did you have a look at the CopyFile method of the File System Object? You > >> can see the full details, including an example, in the help file > >> script56.chm, which you can download from the Microsoft site. > >> Alternatively > >> you might want to create a batch file and use the "copy" command. > >> > >> > >> > > |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Copy File to users home drives if a certain file exists Google is your friend. When you type this into a Google search box: download "script56.chm" then you get around 6,000 hits. The first one is probably the one pointing at the Microsoft site. "Dolfan849" <Dolfan849@newsgroup> wrote in message news:6711A8C2-4F7E-4594-87A8-C1681DB7A572@newsgroup Quote: > No to ask a dumb question, where is script56 located? I wasn't sure where > the example scripts are listed. > > thnx, > tm > > "Pegasus [MVP]" wrote: > Quote: >> Here are the examples you're after, copied straight from >> script56.chm:Function ReportFileStatus(filespec) >> Dim fso, msg >> Set fso = CreateObject("Scripting.FileSystemObject") >> If (fso.FileExists(filespec)) Then >> msg = filespec & " exists." >> Else >> msg = filespec & " doesn't exist." >> End If >> ReportFileStatus = msg >> End FunctionFileSystemObject.CopyFile "c:\mydocuments\letters\*.doc", >> "c:\tempfolder\""Dolfan849" <Dolfan849@newsgroup> wrote >> in >> message news:4E662FED-AD55-4E98-A591-70F234C34AB8@newsgroup>I can >> copy the shortcut/files but I am not sure how to get a script to run Quote: >> > through all the files to check if a certain file is there before I copy >> > it. >> > Do you have the link for the copyfile method? Thanks for your help. >> > >> > tm >> > >> > "Pegasus [MVP]" wrote: >> > >> >> >> >> "Dolfan849" <Dolfan849@newsgroup> wrote in message >> >> news:9552D10D-9E03-4D7B-A2E8-2926655465E6@newsgroup >> >> > Can anyone hlep me creating a VBSCRIPT that will go folders on a >> >> > network >> >> > drive and copy a file (shortcut, .lnk file) to that directory? Any >> >> > help >> >> > would be greatly appreciated. >> >> > >> >> > thnx, >> >> > tm >> >> >> >> Did you have a look at the CopyFile method of the File System Object? >> >> You >> >> can see the full details, including an example, in the help file >> >> script56.chm, which you can download from the Microsoft site. >> >> Alternatively >> >> you might want to create a batch file and use the "copy" command. >> >> >> >> >> >> >> >> |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Access denied trying to copy file across home network | Vista file management | |||
| if a file exists | PowerShell | |||
| Can't copy file from Vista to Windows Home Server | Vista networking & sharing | |||
| Get "file already exists" on trying to save a new file (after rena | Vista General | |||
| File copy from external XP Pro HD to internal Vista Home Premium H | Vista account administration | |||