Batch file, script file what should I do to automate transferring a file?
-
Ok here is the deal. I have a mapped drive "r" that is mapped to a share on ifs on the as400. The 400 is locked down very tight and cannot be loosened up at all because we are on a shared box with different facilities. A file is created every night during day end and I want to do the following: 1. copy the one file that is generated to a differnt folder 2. move the copy from that folder to another server on my local network. This needs to be done everyday and automatically without user interaction. We tried to use ftp programs but they have us so severely limited we cannot do it. So basically I need either a batch file or a script to transfer the file from my mapped 400 drive to another server(locally). I know very little about scripting. Any ideas? also the file name is different everyday.
-
Answer:
oh heck, you can just do this with xcopy from the command line... follow these steps: 1) go to the command line 2) type xcopy /? to see a listing of the possible switches 3) try it a few different times until it does what you want 4) copy the command into a .bat file 5) schedule the batch file to run X often
P C at Yahoo! Answers Visit the source
Other answers
You'll find it's easiest to do this with Windows Scripting Host / VBScript. Google "VBScript file transfer" and you should be able to find appropriate scripts you can modify. So long as the file name follows some pattern -- such as being named after the date -- you should be able to script its name in VBScript. Then, just use scheduled tasks to launch the file every day.
Doug V
Try learning about windows scripting and create a script. You cant just ask for a script to do that, you have to learn how to script before you can create something specific for yourself. Do some research on google and it will lead you in the right direction.
Sean I.T ?
There is some missing information. 1) What machine is running the script? The AS/400, a Windows machine, Linux/Unix machine, etc. 2) Why copy the file and then move the copy? Is it to move it from a protected area on the AS400 to a share? If so, you have to run it on the AS/400? 3) Can you run one script (copy from dir to dir) on the AS/400, then run another script later to copy on the remote systems? What you are trying to do seems quite easy that is why I'm not sure I understand your question. You can contact me via my profile if you'd like to discuss further.
rltm_9999
Related Q & A:
- What should I look for when buying a DVD recorder?Best solution by Yahoo! Answers
- What do I do if I have a crush on two guys?Best solution by quora.com
- What should I do to prepare for a job interview at a grocery store?Best solution by answers.yahoo.com
- What can I expect when I do a computer science major?Best solution by Yahoo! Answers
- What do i need when i get a digital tv converter box?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.