Copy /y "D:\GenesisIntegration\XXX\PO\*.*" "D:\GenesisIntegration\XXX\XXXFiles\"
Copy /y "D:\GenesisIntegration\XXX\RETURNS\*.*" "D:\GenesisIntegration\XX\XXXFiles\"
Copy /y "D:\GenesisIntegration\XXX\GRN\*.*" "D:\GenesisIntegration\XXX\XXXFiles\"
Move /y "D:\GenesisIntegration\XXX\PO\*.*" "D:\GenesisIntegration\XXX\XXXArchive\"
Move /y "D:\GenesisIntegration\XXX\RETURNS\*.*" "D:\GenesisIntegration\XXX\XXXArchive\"
Move /y "D:\GenesisIntegration\XXX\GRN\*.*" "D:\GenesisIntegration\XXX\XXXArchive\"
@echo off
sleep 120
"C:\Program Files (x86)\WinSCP\WinSCP.com" /command "open sftp://xxxxxxxxxxx:xxxxxxxxxxxxxx@xxx.xxx.xxx.xxx/" "put D:\GenesisIntegration\XXX\XXXFiles\* /genesis/"
@echo off
sleep 120
Del /Q "D:\GenesisIntegration\XXX\XXXFiles\*.*"
"exit"
for %%A in (%CopyFolders%/*) do (
if "%WinSCP%" /command "open sftp://xxxxxxxxxxx:xxxxxxxxxxxxxx@xxx.xxx.xxx.xxx/" "put %BaseDir%\%%A %FtpDir%/" (
move /y "%BaseDir%\%%A\*.*" "%ArchiveDir%\"
)
)
ASKER
ASKER
A scripting language is a programming language that supports scripts, programs written for a special run-time environment that automate the execution of tasks that could alternatively be executed one-by-one by a human operator. Scripting languages are often interpreted (rather than compiled). Primitives are usually the elementary tasks or API calls, and the language allows them to be combined into more complex programs. Environments that can be automated through scripting include software applications, web pages within a web browser, the shells of operating systems (OS), embedded systems, as well as numerous games. A scripting language can be viewed as a domain-specific language for a particular environment; in the case of scripting an application, this is also known as an extension language.
TRUSTED BY
ASKER
I need to find a better way of handling issues with Ftp'd files, maybe the supplier needs to delay their processing task so I can setup a file check.
With regards to what you have provided Bill that is very helpful.
1) I was initially after a command to take only the contents of 3 folders and FTP them but as I did not know how to copy the files only I added the first part of the script to move them all to the consolidated directory first.
2) I added the exit command to the WinSCP command initially as the scheduled tasks continued to run without the exit command being there.
Very happy with what you have done, it is better for others to understand and makes good sense!