So I do have a file that I generate weekly from a server using crontab in Linux side and transfer it to my PC. However, I am having a problem when try to send the file that I generate from a different server on Windows side using task scheduler.
Daily upload of file automation using batch script and WinSCP
990 Views Asked by Alfred Paraiso At
2
There are 2 best solutions below
0
Muhammad Hamed
On
Develop a batch file which will download/upload the required file using the SCP command
check this for more details.
check this for more details about the scp command parameters.
Make sure that you are able to run the batch with a successful result, then configure it within a scheduled task.
I hope this could help.
Related Questions in WINDOWS
- Get Maximum Log Size
- Debugging Windows Services while starting
- Possible consequences of duplicate ProgId for different classes
- How to chain BCryptEncrypt and BCryptDecrypt calls using AES in GCM mode?
- mingw-64 conflicting declarations when cross-compiling
- I run an EXE program from a Windows Service but I can't see form C#?
- Why is PowerShell "not recognized" when installing Chocolatey?
- How to check if Windows device is phone or tablet/pc?
- How to add directories to Cygwin gcc default search path
- Can't install anything with pip2 on Windows 7 due to UnicodeDecodeError
- Active directory and linux nslcd binding without extending the AD schema
- How To Prevent Over Scrolling in Scroll Viewer Windows Phone 8.1
- Unicode error from pip install
- Where is the 'EnablePinning' property in the ribbon framework's recent items?
- How can I implement the same models and data across ASP.NET and Windows Apps
Related Questions in BATCH-FILE
- Get Maximum Log Size
- Running batch fine onclick delay
- Automating Telnet Scripts from .bat with a teamspeak instance
- Variable setting exhibits unexpected behavior when set inside for loop
- Execute a command over multiple files
- How to run multiple "mvn test"-commands from batch file?
- Referencing a Schema's table batch/perl
- Can I use \ and / to be directory delimiter in CLASSPATH of .bat
- SSIS exit code error with batch file
- CMD/BATCH - Had to run batch script 3 times to get full result
- Trying to create a Bath file that will copy a specific directory path (no lower) and zip the directories in that path
- curl command don't work in some cases
- Set environment in current cmd using batch script
- What is the correct way to pass the password to OpenSSL
- Batch file to process files in sub sub directory
Related Questions in TASK
- background thread using Task.Run
- How to ensure data synchronization across threads within a "safe" area (e.g not in a critical section) without locking everything
- Task await fails
- How to handle multiple activity task in android when press home?
- Run work on specific thread
- c# Simple TASK Cancel
- Add checkbox in task Page In inno-setup and make it work according to checkbox
- How to fetch tasks from android calendar?
- Javafx concurrency and gui-update
- Celery Logging: consistent way to log inside and outside of a task
- Android Studio ——How can I modify one Class's field before compile by build.gradle
- the mappers execute sequentially not parallelly
- Java RMI Compute Engine
- Task finishes before expected
- What are the ContinueWith default values
Related Questions in SCHEDULER
- How to stop sling scheduler work if inconsistent situation occures inside the job?
- rm scheduling - calculation
- Can I use Akka scheduler to schedule multiple things from a single actor context?
- Scheduling java process for a specific time interval with a given delay
- Add/remove process from kernel runqueue
- Scheduling multiple instance of a single java process
- Who starts the OS process scheduler?
- web2py Scheduled task to recreate (reset) database
- Schedule to run a method at periodic time´
- Java: scheduling task execution once a month (or two)
- Windows Azure Mobile Services JavaScript code for Twitter API
- windows task scheduler: how trigger task then program has closed?
- Hide time row in Kendo UI Scheduler
- Getting Thread timeslice in C#
- How to call spring scheduler from UI
Related Questions in WINSCP
- Prevent Linux user from connecting with WinSCP
- Unable to locate file through winscp
- WinSCP .NET assembly Skip failures
- VBScript to download files via SFTP using WinSCP fails with Unable to use key file (unable to open file)
- I can't access my bitnami server using ppk
- WinSCP error "No such file" when uploading files to server
- Enabling text file logging for WinSCP script
- WinSCP automate file transfer- Should the batch and script file locate in virtual or local directory?
- Selecting FTP protocol in WinSCP script
- How to register WinSCP .NET assembly in VB6
- WinSCP - Transfer was successfully finished but nothing on virtual directory
- Count number of files on FTP server
- Error listing directory: Invalid Argument to date encode [3082-80-91]
- SFTP via JSch is throwing error 4: Failure
- How to upload files to home using WinSCP .NET assembly?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Your command-line syntax is wrong.
I'm assuming the
\ftpBinverlog_%yyyy%-%mm%-%dd%.txtis the file, you want to download.%yyyy%.So just keep your
/scriptand/logarguments:And make sure the
script.tmplooks like:References:
%TIMESTAMPsyntax.