Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: PUT upload with Time Constraint

- But you have to escape the ^. What is the \ good for there?
- I also do not understand, why are you adding the %DD%%MM%%YYYY% there.
- Why is a script name different? SSH_SCRIPT3.TXT vs. DPA_SSH_SCRIPT3.TXT

This should be working:
echo put %TRANSACTION_EXTRACT_DIR%\FINANCE*.csv*^>60N >> DPA_SSH_SCRIPT3.TXT

Though this is more safe and you do not need any escaping:
echo put "%TRANSACTION_EXTRACT_DIR%\FINANCE*.csv*>60N" >> DPA_SSH_SCRIPT3.TXT
zoomzoomvince

PUT upload with Time Constraint

I have got a job which builds a script (by echoing out the commands to a text file) and which is then executed by WinSCP to upload some files. I am trying to tell it to upload CSV files created within e.g. 60 minutes. The trouble is that it is ignoring the mask and uploading all the files.


echo open %oracle_usr%:%oracle_pwd%@%oracle_svr% -hostkey=%oracle_key% > SSH_SCRIPT3.TXT

echo lcd %EXTRACT_DIR% >> SSH_SCRIPT3.TXT
echo cd %oracle_dir% >> SSH_SCRIPT3.TXT
echo put %TRANSACTION_EXTRACT_DIR%\FINANCE*.csv*^\>60N%DD%%MM%%YYYY%^ >> DPA_SSH_SCRIPT3.TXT


60N sets it to only get files created within the last 60 minutes and %DD%%MM%%YYYY% is the timestamp format (UK).
Because I am piping it out to a file I have escaped it with the ^ character.
~Even if I drop %DD%%MM%%YYYY% and just have ^>10N^ it still uploads all the files.