Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.excel.programming > #110236 > unrolled thread

Re: Error 58, file already exists - why?

Started bygary@gcisecurityinc.com
First post2017-08-29 06:33 -0700
Last post2017-09-14 16:54 +0100
Articles 2 — 2 participants

Back to article view | Back to microsoft.public.excel.programming

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Error 58, file already exists - why? gary@gcisecurityinc.com - 2017-08-29 06:33 -0700
    Re: Error 58, file already exists - why? Adrian Caspersz <email@here.invalid> - 2017-09-14 16:54 +0100

#110236 — Re: Error 58, file already exists - why?

Fromgary@gcisecurityinc.com
Date2017-08-29 06:33 -0700
SubjectRe: Error 58, file already exists - why?
Message-ID<eac7a1cd-8416-4d9d-a3f7-6285d6251adb@googlegroups.com>
On Monday, February 1, 2010 at 10:46:02 AM UTC-6, Rookie_User wrote:
> I am trying to move a file from one folder to another - or at least copy and 
> delete the old file.  I get an error 58 file already exists, and don't know 
> why?
> 
> 
> 
> Public Sub MoveFiles(ByVal Source As String, ByVal Destination As String)
> Dim oFSO As Object
> Set oFSO = CreateObject("Scripting.FileSystemObject")
> With oFSO
> If .FileExists(Source) Then
> .MoveFile Source, Destination
> Else
> MsgBox Source & " Doesn't Exist", vbExclamation
> End If
> End With
> Set oFSO = Nothing
> End Sub
> 
> Sub RunThroughList()
> Dim I As Long
> Dim Destination As String
> Dim Lastrow As Long
> 
> Lastrow = Worksheets(1).Cells(Rows.Count, 1).End(xlUp).Row
> 
> For I = 1 To Lastrow
> MoveFiles Range("A" & I).Value, "C:\Output"
> 
> Next
> End Sub

[toc] | [next] | [standalone]


#110313

FromAdrian Caspersz <email@here.invalid>
Date2017-09-14 16:54 +0100
Message-ID<f1vn2iF2ilaU1@mid.individual.net>
In reply to#110236
On 29/08/17 14:33, gary@gcisecurityinc.com wrote:
> On Monday, February 1, 2010 at 10:46:02 AM UTC-6, Rookie_User wrote:
>> I am trying to move a file from one folder to another - or at least copy and
>> delete the old file.  I get an error 58 file already exists, and don't know
>> why?

Why dig up an answered post?

Before anyone wastes time on this, read the thread.

https://groups.google.com/forum/#!topic/microsoft.public.excel.programming/935qBX3KYyg


-- 
Adrian C

[toc] | [prev] | [standalone]


Back to top | Article view | microsoft.public.excel.programming


csiph-web