ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

»s«ü©w CÀɦ즳ÀɦW¤§ÀÉ®×

»s«ü©w CÀɦ즳ÀɦW¤§ÀÉ®×

DEAR  ¤j¤j..

½Ð±Ð,¦p¦ó§ï¦¨, C1Äæ¦ì..¤@ª½©¹¤U,  
PS: ½Æ»s«ü©w CÀɦ즳ÀɦW¤§ÀÉ®×

Sub file_move()

Set fds = CreateObject("Scripting.filesystemobject")
fd = [a1]
fo = [b1]
fa=[c1].value         ---> ?

fs = Dir(fd & fa)
Do Until fs = ""     --->??  
If fds.FileExists(fo & fs) Then
    MsgBox "¥Ø¼Ð¸ê®Æ§¨,¦³¨Ó·½¤§¦PÀɦWÀÉ®×,½Ð½T»{", vbOKOnly, "¿ù»~°T®§"
Exit Sub
End If

fds.copyfile fd & fs, fo & fs

fs = Dir
Loop
End Sub




¦A³Â·Ð...

¦^´_ 1# tomking
¬O³o¼Ë¶Ü?
  1. Option Explicit
  2. Sub file_move()
  3.     Dim fds As Object, fd As String, fo As String, fs As String, i As Integer
  4.     Set fds = CreateObject("Scripting.filesystemobject")
  5.     fd = [a1]
  6.     fo = [b1]
  7.     i = 1
  8.     Do While Cells(i, "C") <> ""
  9.         fs = Dir(fd & Cells(i, "C"))
  10.         If fs = "" Then Exit Do
  11.         If fds.FileExists(fo & fs) Then
  12.             MsgBox "¥Ø¼Ð¸ê®Æ§¨,¦³¨Ó·½¤§¦PÀɦWÀÉ®×,½Ð½T»{", vbOKOnly, "¿ù»~°T®§"
  13.             Exit Sub
  14.         End If
  15.         fds.copyfile fd & fs, fo & fs
  16.         i = i + 1
  17.     Loop
  18. End Sub
½Æ»s¥N½X

TOP

·PÁª©¥D

¥V¦Ü±N¨ì ,¥V¦Ü§Ö¼Ö...

TOP

        ÀR«ä¦Û¦b : ·O´d¨S¦³¼Ä¤H¡A´¼¼z¤£°_·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD