Prev: Refresh Network List
Next: Excel pop3 issue
From: Kenneth A. Larsen on 28 Jul 2010 19:30 "Peter" <noMorespam(a)MSUK.com> wrote in message news:%234yh86F7KHA.604(a)TK2MSFTNGP05.phx.gbl... > Hello > > I'm coping a file, and if there is a existing file I delete it before the > copy. I'm checking the read only attribute, because sometimes that may be > set, so if it is set, I remvoe it. > > If (fso.FileExists("C:\myfile.bin")) Then > Set MyFile = fso.GetFile("C:\myfile.bin") > If (MYFile.Attributes And 1) Then > LogToFile "Removing Read Only Attributes on myfile.binbefore copy","" > MYFile.Attributes = MYFile.Attributes - 1 > End If > Myfile.Delete > End If > > After I delete the file the next step is the copy. I've heard from my > users that the file I copy to the C works, fine but the read only attrib > is marked on the file I copy. > > So after you CopyFile() does that function make the file readonly? Is te > source file that I'm coping in probably marked as read only? Dear Peter, By copying a file, you can move it to another folder. I'm curius, did you look for those files on MS-DOS Prompt? If you have any more problems copying files how about look up copying files on the internet. Or if that doesn't work, please let me know by emailing me at 2 addresses. LarsenK(a)verizon.net or kuhlpc#2(a)optimum.net. From, Kenny >
From: Kenneth A. Larsen on 28 Jul 2010 19:46 "Kenneth A. Larsen" <LarsenK(a)verizon.net> wrote in message news:u$I9ZzqLLHA.1868(a)TK2MSFTNGP05.phx.gbl... > > "Peter" <noMorespam(a)MSUK.com> wrote in message > news:%234yh86F7KHA.604(a)TK2MSFTNGP05.phx.gbl... >> Hello >> >> I'm coping a file, and if there is a existing file I delete it before the >> copy. I'm checking the read only attribute, because sometimes that may >> be set, so if it is set, I remvoe it. >> >> If (fso.FileExists("C:\myfile.bin")) Then >> Set MyFile = fso.GetFile("C:\myfile.bin") >> If (MYFile.Attributes And 1) Then >> LogToFile "Removing Read Only Attributes on myfile.binbefore copy","" >> MYFile.Attributes = MYFile.Attributes - 1 >> End If >> Myfile.Delete >> End If >> >> After I delete the file the next step is the copy. I've heard from my >> users that the file I copy to the C works, fine but the read only attrib >> is marked on the file I copy. >> >> So after you CopyFile() does that function make the file readonly? Is te >> source file that I'm coping in probably marked as read only? > > Dear Peter, > By copying a file, you can move it to another folder. I'm curius, did you > look for those files on MS-DOS Prompt? If you have any more problems > copying files how about look up copying files on the internet. Or if that > doesn't work, please let me know by emailing me at 2 addresses. > LarsenK(a)verizon.net or kuhlpc#2(a)optimum.net. > > From, > Kenny > >> > >
From: Al Dunbar on 28 Jul 2010 20:32 "Kenneth A. Larsen" <LarsenK(a)verizon.net> wrote in message news:u$I9ZzqLLHA.1868(a)TK2MSFTNGP05.phx.gbl... > > "Peter" <noMorespam(a)MSUK.com> wrote in message > news:%234yh86F7KHA.604(a)TK2MSFTNGP05.phx.gbl... >> Hello >> >> I'm coping a file, and if there is a existing file I delete it before the >> copy. I'm checking the read only attribute, because sometimes that may >> be set, so if it is set, I remvoe it. >> >> If (fso.FileExists("C:\myfile.bin")) Then >> Set MyFile = fso.GetFile("C:\myfile.bin") >> If (MYFile.Attributes And 1) Then >> LogToFile "Removing Read Only Attributes on myfile.binbefore copy","" >> MYFile.Attributes = MYFile.Attributes - 1 >> End If >> Myfile.Delete >> End If >> >> After I delete the file the next step is the copy. I've heard from my >> users that the file I copy to the C works, fine but the read only attrib >> is marked on the file I copy. >> >> So after you CopyFile() does that function make the file readonly? Is te >> source file that I'm coping in probably marked as read only? > > Dear Peter, > By copying a file, you can move it to another folder. I'm curius, did you > look for those files on MS-DOS Prompt? If you have any more problems > copying files how about look up copying files on the internet. Or if that > doesn't work, please let me know by emailing me at 2 addresses. > LarsenK(a)verizon.net or kuhlpc#2(a)optimum.net. > > From, > Kenny Why do you always recommend people email you for more information? That is a bit counter to the concept of the newsgroup, where perhaps others might benefit from following the discussion. /Al
|
Pages: 1 Prev: Refresh Network List Next: Excel pop3 issue |