Posts filed under 'Networking'
There is usually more than one way to accomplish this task, but I have struggled with how to create a scheduled ftp job in Windows for a long time.
I recently ran into a problem which forced me to figure out how to create a scheduled ftp job. I needed to post results from my fantasy football league draft to a website so the slackers who couldn’t be at the live draft could more easily follow along and know who had been drafted so far. The software I use to conduct my draft (FFLM) can automatically generate HTML reports after each pick. I needed to create an FTP job that would take those HTML reports and post them to a website for the remote drafters to see.
I’ve used Linux and cron before, and I was hoping to get something like that in Windows. Although it’s not too difficult in Windows, I needed to do a little research to figure out how to create a scheduled ftp job.
I found an article on the Microsoft Help and Support site that shows how to use an FTP Batch script. If you open up Notepad, you can create a simple file that contains all of the commands you need to type in for your ftp job. Just type in the commands you would use in the ftp command-line utility. For example, my .scr file looks something like this:
open 10.0.0.1
user
password
lcd "C:\Files\ToFTP"
cd website/Fantasy/Football/Directory
put DraftResults.htm
put TeamRosters.htm
bye
The first line connects to the FTP server, the second and third lines are the username and password to connect to the server. The fourth line changes my local dirctory to C:\Files\ToFTP, where my files are located. The fifth line gets to the proper directory in the FTP server, it’s where my files are going to be placed. The sixth and seventh lines transfer the two report files to the server. The eighth line disconnects from the server.
Saving this file as a .scr file means that I now have an FTP script to run. From the command line I can simply type:
ftp -s:Test.scr
The script will run and the two files will be placed on the server.
Now that we have the ftp script, it’s time to automate it. All we need to do is create a very simple batch file. Again, this can be done simply using Notepad. The batch file will basically run the ftp command line script as shown above. Here are the contents of the batch file:
::DraftFTP.bat
::Uploads Draft Files to Website
@ECHO OFF
cd "C:\Files"
ftp -s:Test.scr
The first two lines are comment lines. The third line tells the batch file not to display the command prompt as the commands are executed. The fourth line changes the directory to where the Test.scr file is located. You should recognize what the fifth line does from what we did above.
Now we have a batch file. Double click it and it will run, placing the two files on to the webserver.
So we’re almost there. Now that we have the ftp script and the batch file to run it, all we need to do is create a scheduled job to automatically run the batch file at a given interval.
Open the Scheduled Tasks (Start > Programs > Accessories > System Tools > Scheduled Tasks) and create a new Scheduled Task. Don’t bother going through the wizard, just right-click and select New > Scheduled Task. Give it a name and then open it up. In the Task tab, select the batch file you just created as the program to run. Then simply fill out the Schedule, Setting, and Security options as desired.
Then sit back and enjoy as the Scheduled Task runs your batch file containing your FTP script, automatically putting your files according to the schedule you have defined.create a scheduled ftp job
As mentioned above, there is usually more than one way to accomplish a task. If you know a better way to create a scheduled ftp job please share your tips below, or let me know if this solution worked for you.
September 19th, 2006
If you have broadband, buy a router. A router is a simple standalone piece of hardware that allows more than one computer to share an Internet connection. If you own only one computer and have broadband, you still need a router.
Without a router, your computer is connected directly to the Internet. Or a better way to think of it is that the Internet has a direct connection to your computer.

With a router, your computer is on a separate network from the Internet (but still has access to the Internet). The router doesn’t let anything into the home network that doesn’t belong there. Specifically, a computer on your network must ask for information from the Internet for your router to allow information from the Internet to enter your home network.

The techology routers use to help share an Internet connection also adds a security layer to thwart worms, malware, and other internet-based attacks. This techology called NAT (which stands for Network Address Translation), essentially creates two separate networks.
Here is how it works: let’s say you request to access yahoo.com. Your request first goes to the router, which notes that you are making a request to yahoo.com, and forwards the request to yahoo.com. When a response comes back from yahoo.com, the router forwards the response back to the computer that issued the original request. If traffic comes in from Evil-Internet-Worm.com unsolicited, the router knows that no computer on the network has requested information from that site and blocks it. Evil-Internet-Worm cannot get through and infect your computer.
Routers are not terribly expensive, plain wired routers are around $30 and the increasingly popular wireless routers can be had for less than $100 and even cheaper on sale. Wireless routers need to be set up properly to make them secure, but offer the same separation from the Internet using NAT as wired routers do.
If you have broadband and you don’t yet have a router, you’re just asking for trouble.
September 3rd, 2005
Wireless networks are all the rage these days. Improvements in wireless technology and falling prices are making wireless networks the new cell phone — everybody is getting one.
Most of the improvements in wireless technology have been in the user-friendly category. In fact, many of these improvements that now let four-year olds set up a wireless network have made this networking medium dangerously insecure.
Don’t be tempted to use the “works right out of the box” functionality of wireless routers and access points. The factory defaults for these items are well-known and exploited. Let me give you a quick example:
Jeff purchases his LINKSYS 11Mbps Wireless Access Point Router, takes it out the box, plugs in his cable modem to the WAN port, plugs in the power supply and turns it on. Jeff grabs his laptop, which has built-in wireless equipment, boots up and sees his new wireless network in a pop-up bubble off his Windows XP taskbar. He opens Internet Explorer and begins to surf the ‘net wirelessly. Cool, right?
Well, later that night after Jeff surfed from every room in his house (just because he could), a fourteen-year-old kid who stumbled upon wardriving.com and made her own antenna out of a Pringles can decides to begin her career as a hacker. She points her antenna out her window and goes to her computer to see what wireless networks show up on netstumbler, this cool new program she just downloaded.
After scanning, netstumbler shows 3 networks in her neighborhood alone. These networks are named: linksys, jonesfam, and cantHackMe. She smiles because she now can have some fun. After reading for 30 minutes on the web, she knows the linksys network is now her network. The jonesfam network may not be that interesting (unless she has a crush on one of the Jones boys), and the cantHackMe network may just be too much effort for a beginner. However, she has learned that a network with the default name of linksys means it is wide open — in fact, if she were malicious she could teach a lesson by logging into the wireless router with the default password of ‘admin’ and lock the rightful owner out of their own network. But that would be mean. So she connects to the linksys network and downloads pirated movies all night, knowing that even if the RIAA is watching, they will be knocking on someone else’s door.
Given the above example, the average computer user should do follow these steps when setting up a wireless network. The first three are mandatory, four and five are highly recommended to lock down your wireless network.
Step 1: Change the name of your wireless network
The name of your wireless network is called the SSID. Most wireless routers and other equipment come with easy-to-use web interfaces. Simply log on to your equipment as shown in the user manual (yes, even read it!), and change the SSID. Try not to enter any personal information that may invite trouble (for example: the jonesfam network may be a hot target for young teenage girls).
Step 2: Disable SSID broadcasts
Once you’ve change your SSID, your wireless equipment may be shouting that name to any wireless equipment that can hear. Turn off the broadcast makes it even harder for hackers to discover your SSID. The SSID is comparable to a username, sure that hackers still need the password, but if have to figure out the username and password, their job is much more difficult.
Step 3: Change the default administrator password
The default passwords for wireless equipment are widely known and readily available. You don’t want hackers locking you out of your own network. Use a good password, change it, and change it often.
Step 4: Enable WEP
WEP stands for Wired Equivalent Privacy, and is basically a method of encrypting the data going back and forth wirelessly so that only the intended recipient can read the data. WEP is not perfect, but it should keep out everyone but the super hacker who would need several days worth of encrypted data to break it. For small home networks, this isn’t realistic, so WEP should be fine.
Step 5: Choose your friends
All networking equipment comes with a MAC address — a number that identifies each unique piece of networking equipment. You can enter in the MAC addresses of the cards you own and that are authorized to use your wireless network. All other MAC addresses will be ignored. Again, this isn’t perfect, but it’s more than enough to dissuade the casual hacker.
So, no need to fear your neighborhood eighth-graders or other hackers. Follow the steps to make your wireless network a very unattractive alternative for would-be hackers. You will never have a totally secure network, wireless or wired, but the idea is to make it a lot harder to break into than the next guy down the street. Let him get the visit from the RIAA.
March 26th, 2004