Jump to content

filecopy


sbrady
 Share

Recommended Posts

the only thing NOT working in this script is the FileCopy command, 4 lines from the end.

This was working 2 hours ago, now, nothing. any ideas come to mind.

#include
#include

; open DAW1 promos folder
ShellExecute ("\\10.10.44.37\Incoming Projects DAW1\Promos\Open PM")

;open DAW3 promos folder
ShellExecute ("C:\Documents and Settings\sebrad\Desktop\Open PM3")



Local $source = "\\10.10.44.37\Incoming Projects DAW1\Promos\Open PM\"
Local $dest = "C:\Documents and Settings\sebrad\Desktop\Open PM3\"

;1 list all folders in the DAW1 promos folder
Local $FileList = _FileListToArray("\\10.10.44.37\Incoming Projects DAW1\Promos\Open PM")


;2 cycle through the EXPORTS folders, get name and make folder
For $i = 1 To $FileList[0] ;the [0] element holds the count

If StringInStr($FileList[$i], "EXPORTS") Then ;Does the folder name contain the string "EXPORTS"?
Local $export_folder_name = $FileList[$i]
DirCreate ( $dest & $export_folder_name )
;2 end cycle through the EXPORTS folders, get name and make folder


;3 open the newly created export folder
ShellExecute ($dest & $export_folder_name)


;4 place and size the newly created EXPORT Folders
IF StringInStr ($export_folder_name, "OPEN EXPORTS") then
WinActivate ( $export_folder_name )
WinMove ( $export_folder_name,"",50,100,400,500)
ElseIf StringInStr ($export_folder_name, "NDP EXPORTS") then
WinActivate ( $export_folder_name )
WinMove ( $export_folder_name,"",470,100,400,500)
ElseIf StringInStr ($export_folder_name, "BUMPER EXPORTS") then
WinActivate ( $export_folder_name )
WinMove ($export_folder_name,"",890,100,400,500)
EndIf
;4 end place and size the newly created EXPORT Folders


;5 copy all folder contents to destination
Local $FileList2 = _FileListToArray($source & $export_folder_name)
MsgBox(8192, "Files", $FileList2)
FileCopy ( $FileList2, $dest & $export_folder_name)
;5 end copy all folder contents to destination


EndIf
Next
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...