Solved

automatically send a file from my share directory to a ftp site.

Posted on 2007-03-28
7
165 Views
Last Modified: 2010-04-13
My Operating System is Windows 2000.  I need to automatically send a file from my share directory to a ftp site.  I need to use MS Schedule Task to run this process daily @ 6am EST.  Please help as I am not familiar with .bat files/setup, etc.

Path contains folder to send = R:\\jax\dept\"PRogram1.csv"
FTP site = ftp:\\ftsmur1\VVG\jax\
My Login is anonymous


 
0
Comment
Question by:smcfarla
  • 4
  • 2
7 Comments
 
LVL 67

Expert Comment

by:sirbounty
Comment Utility
Just schedule this command to run at 6am

ftp -s:c:\putfile.scr


PutFile.scr would contain the following
open ftsmur1
user
guest
guest
cd VVG\jax
put R:\\jax\dept\"PRogram1.csv"
quit


http://support.microsoft.com/kb/96269 gives greater detail
0
 
LVL 6

Expert Comment

by:kane77573
Comment Utility
Yep follow Sir Bounty he has this one tied down
0
 

Author Comment

by:smcfarla
Comment Utility
how do i schedule the command to run?  What application file do I need to open "PutFile.scr"?  Please help...
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 67

Expert Comment

by:sirbounty
Comment Utility
1) Putfile.scr can really be 'anything'...I just used that as an example - the .scr denotes that it's a script, but it could just as easily be test.txt and still work, provided the ftp -s: points to that name

2) the schedule task can be done via the gui, or command line:

schtasks /create /ru system /sc daily /st 06:00:00 /tn FTPScript /tr "ftp -s:c:\putfile.scr"

should do it...
0
 

Author Comment

by:smcfarla
Comment Utility
I understand how to create the .scr file {Thanks!!}
When I open a New Task (from Scheduled tasks), Where do I type my code?
Here are my options:
1. Run:
2. Start in:

I assume that I put the code in the "RUN:" option, is this right?
RUN:  schtasks /create /ru system /sc daily /st 06:00:00 /tn FTPScript /tr "ftp -s:c:\putfile.scr"

And  do I put the New Task.job location in the "Start in:" option?
Start in:  C:\\WNDOWS\Tasks\New Task.job

Sorry, this is a new experience for me.
0
 
LVL 67

Accepted Solution

by:
sirbounty earned 500 total points
Comment Utility
You can leave start in blank...it'll default to the path
You would place it in the run, but the command I gave you was to do it from the command line.
If doing it from the GUI (Scheduled tasks) - place this in the "Run" line:

c:\YourFile.bat
(where YourFile.bat is another file containing the line:

ftp -s:c:\putfile.scr

0
 
LVL 67

Expert Comment

by:sirbounty
Comment Utility
Happy to help - thanx for the grade! :^)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Several part series to implement Internet Explorer 11 Enterprise Mode
The use of stolen credentials is a hot commodity this year allowing threat actors to move laterally within the network in order to avoid breach detection.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now