Windows Legacy OS forum

General discussion

XP Schedule Batch file

by 10finch46 / January 1, 2009 12:31 PM PST

I have my schedules running properly for WSFTP uploading, but have a problem running a batch file.

In Task [ C:\BatchFile\Ftp.bat ]
Run as Administrator
X - Enable (schedual task runs at specified time)
Schedule task Weekly / 12.01 Am / Every 1 week / on Wed & Sat
All permissions = Yes

Any suggestions as to what I am doing wrong.

Thanks

Discussion is locked
You are posting a reply to: XP Schedule Batch file
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: XP Schedule Batch file
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
Does that Administrator account ...
by Edward ODaniel / January 2, 2009 7:47 AM PST
In reply to: XP Schedule Batch file

have a password.

most scheduled tasks require the user password and just don't "like" a blank one.

Collapse -
Password
by 10finch46 / January 2, 2009 10:09 AM PST

Thanks for your idea, but the Scheduled task has a administrator password.

Collapse -
Does the account you scheduled the task from ...
by Edward ODaniel / January 3, 2009 4:47 AM PST
In reply to: Password

have a password?

Read -
Scheduled Tasks cannot run with a blank password
http://support.microsoft.com/?id=310715

Another cause for scheduled batch files failure to run is that the FULL PATHS must be in the batch files -

This:
REN C:\Logs\default_server_stdout.log default_server_stdout%dd%%mm%%yyyy%.log

rather than this:
REN default_server_stdout.log default_server_stdout%dd%%mm%%yyyy%.log

You might try scheduling CMD /k to run interactively then run your batch file manually to see the errors.

Also, since you are scheduling an FTP file transfer why not simplify things and just use the command line FTP within the batch file?

Ftp

Transfers files to and from a computer running an FTP server service (sometimes called a daemon). Ftp can be used interactively. See ftp commands for a description of available ftp commands. This command is available only if the TCP/IP protocol has been installed.
ftp [-v] [-d] [-i] [-n] [-g] [-s:filename] [-a] [-w:
windowsize] [computer]

Parameters

-v
Suppresses display of remote server responses.
-n
Suppresses auto-login upon initial connection.
-i
Turns off interactive prompting during multiple file transfers.
-d
Enables debugging, displaying all ftp commands passed between the client and server.
-g
Disables filename globbing, which permits the use of wildcard chracters in local file and path names. (See the glob command in the online Command Reference.)

-s:filename
Specifies a text file containing ftp commands; the commands will automatically run after ftp starts. No spaces are allowed in this parameter. Use this switch instead of redirection (>).
-a
Use any local interface when binding data connection.
-w:windowsize
Overrides the default transfer buffer size of 4096.
computer
Specifies the computer name or IP address of the remote computer to connect to. The computer, if specified, must be the last parameter on the line.

More Information About Ftp


Example using commands file:

ftp -s:upload_files -- this starts FTP and automatically runs all the commands in the delphi_up file which consists of the following:

upload_files contents:

open ftp.somewhere.com
username
password
cd web
cd Graphics
lcd N:\temp\test
dir
binary
prompt
mput *.*
bye

Collapse -
Working, thanks
by 10finch46 / January 3, 2009 1:33 PM PST

Thank you for your suggestion and I have the scheduled batch file running by changing the file length to 8 characters, which seems to be related to the length of a Dos name.

Popular Forums
icon
Computer Newbies 10,686 discussions
icon
Computer Help 54,365 discussions
icon
Laptops 21,181 discussions
icon
Networking & Wireless 16,313 discussions
icon
Phones 17,137 discussions
icon
Security 31,287 discussions
icon
TVs & Home Theaters 22,101 discussions
icon
Windows 7 8,164 discussions
icon
Windows 10 2,657 discussions

CNET FORUMS TOP DISCUSSION

Help, my PC with Windows 10 won't shut down properly

Since upgrading to Windows 10 my computer won't shut down properly. I use the menu button shutdown and the screen goes blank, but the system does not fully shut down. The only way to get it to shut down is to hold the physical power button down till it shuts down. Any suggestions?