Ceriwis  

Go Back   Ceriwis > HOBI > Komputer & Teknologi > Shareware & Freeware

Shareware & Freeware Bertukar informasi mengenai Software berbayar ataupun gratis.

Reply
 
Thread Tools
  #1  
Old 24th October 2012
Syahrani10's Avatar
Syahrani10 Syahrani10 is offline
Ceriwiser
 
Join Date: Oct 2012
Posts: 914
Rep Power: 15
Syahrani10 mempunyai hidup yang Normal
Default 1 file copy ke banyak folder VBscript atau BAT jg boleh

izin koreksi master untuk script VBs,BAT,atau apajalah



pertanyaanya ada yg punya resep lebih simple gk ya?



cth1


Code:

mover.vbsSet fso=CreateObject("Scripting.FileSystemObject")
source="d:\path1\"
target="d:\path2\"

Set fldr=fso.getFolder(source)
for each file in fldr.files
if right(lcase(file.name),4)=".pdf" then
call mover(lcase(file.path))
end if
next

sub mover(f1)
f2=replace(f1,"pdf","txt")
if fso.fileExists(f2) then
fso.MoveFile f1,target
fso.MoveFile f2,target
wscript.sleep 60000
end if
end sub

cth2


Code:

Const OverwriteExisting = True
Set objArgs = WScript.Arguments
Set objFSO = CreateObject("Scripting.FileSystemObject")

If objArgs.Count < 1 Then
MsgBox "Thanks but.. Wrong!!" & vbCRLF & _
"" & vbCRLF & _
"Select a file in Explorer, drag and drop it on the script." & vbCRLF & _
"Or place a shortcut from the script into the SendTo folder" & vbCRLF & _
"This way the script will show in the sendto right click menu ." & vbCRLF & _
"" & vbCRLF & _
"To edit the sendto menu go to 'Start - Run - Sendto - OK" & vbCRLF & _
"Place the shortcut from DropFile.vbs in the SendTo folder, now right click a file and 'Send To'DropFile", _
vbInformation + vbOKOnly, Title
WScript.Quit
End If


For I = 0 to objArgs.Count - 1

Arg = objArgs(I)

objFSO.CopyFile Arg, "C:\DestFolder01\", OverwriteExisting
objFSO.CopyFile Arg, "D:\DestFolder02\", OverwriteExisting
objFSO.CopyFile Arg, "E:\DestFolder03\", OverwriteExisting
objFSO.CopyFile Arg, "F:\DestFolder04\", OverwriteExisting
objFSO.CopyFile Arg, "G:\DestFolder05\", OverwriteExisting

Next
WScript.Quit

contoh lainya dari sini

</div>
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Terkait
Thread Thread Starter Forum Replies Last Post
(Share)Folder Locker, Melindungi File dalam folder SSHacker Shareware & Freeware 0 24th October 2012 10:01 PM
[Files] GiliSoft File Lock v5.1 - Kunci file, folder, dan drive biar aman Braincode Shareware & Freeware 0 11th November 2011 11:25 PM
Cara Memunculkan Kembali File atau Folder yg di 'SUPER' HIDDEN Akibat Kena Virus gfdsa1 Gossip & Gallery 8 10th November 2011 01:45 AM
File atau Folder yg di 'SUPER' HIDDEN Akibat Kena Virus, Gunakan Cara ini.. gfdsa1 Programming 0 16th July 2011 07:25 PM

 


All times are GMT +7. The time now is 08:55 AM.