# 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: Script only moving one file in the directory

mgibbons wrote:

my script only succeeds with one file in the local directory.

Sorry, but that's vague.
Please attach a full session log file showing the problem (using the latest version of WinSCP).
To generate the session log file, use /log=C:\path\to\winscp.log command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

this script to upload only the one from "today" to the remote directory.

For that, see https://winscp.net/eng/docs/script_upload_most_recent_file#scripting
mgibbons

## Script only moving one file in the directory

I am trying to automate a SFTP transfer and have written the script below. The problem I am running into is that there are multiple files in the local directory, and my script only succeeds with one file in the local directory.

I am very much a noob and just starting to learn this stuff. The desired goal is to allow multiple files to sit in the local directory and this script to upload only the one from "today" to the remote directory. Does anyone have any thoughts on why this may be happening.
cd /Home/marywood.edu/In/Reconciliationoption confirm offoption transfer binaryput "E:\Partner Center\*.*"closeexit