Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

Use Date time in Filename

Original Message
Name: normie
Date: January 21, 2004 at 15:16:11 Pacific
Subject: Use Date time in Filename
OS: xp
CPU/Ram: 1ghz 1gb
Comment:
Thanks to this wonderful list, I created a bat file which dials an existing DUN entry (using RAS Dail 95), then using WCL_FTP tool, it sends a file to a server giving it a filename which is append with the current date time. Sounds good right??
Until I try it on a Win98 machine. This bat file has been tested on XP and W2k.

Any ideas why it doesn't work. My guess is the date commands aren't recognised by Win98.

here is the file...
@echo off
REM This file cannont be deleted, and should only be edited by the network administrator.
REM To Set this file for a new store, edit the FTP Variables

:DUN Variables

set DUNProgram=rasdial95.exe
set DUNEntry=ISP
set DUNPhone=ISP PHONE NUMBER
set DUNUserName=ISP USERNAME
set DUNPassword=ISP PASSWORD

:Sharptrak Details

set STORENAME="ENTER STORE NAME HERE"
set InstallFolder=c:\installpath

:FTP User Variables

set FTPSERVER=ServerAddress
set FTPUsername=username
set FTPPassword=password

:FTP Program variables

set FTPProgram=wcl_ftp.exe
set UploadFileExtension=_%Date:~-4,4%%Date:~-10,2%%Date:~-7,2%_%Time:~0,2%%Time:~3,2%.mer
set JobsFile=uploadfile.ext
set FTPTitle="Sending Jobs"
set FTPServerPath=/
set FTPCommand=put
set FTPSwitches=1 0 0 1


:Batch File starts Here

cd %InstallFolder%\components

:Connect to ISP
echo "Connecting to the Internet"
%DUNProgram% %DUNEntry% %DUNUserName% %DUNPassword% /Phone:%DUNPhone%


%FTPProgram% %FTPTitle% %FTPSERVER% %FTPUsername% %FTPPassword% %FTPServerPath% %STORENAME%%UploadFileExtension% %JobsFile% %FTPCommand% %FTPSwitches%

Any help would be appreciated.


Report Offensive Message For Removal


Response Number 1
Name: Wengier
Date: January 21, 2004 at 15:31:20 Pacific
Subject: Use Date time in Filename
Reply: (edit)
So, that is because DOS batch and NT scripting are different! You should know that Windows XP does not include "DOS". The "Command Prompt" in WinXP is just the WinNT/2K/XP system console, which is not DOS, and the WinNT/2K/XP Console scripts are NOT DOS batches! Below is the *quotation* from the warning messages of this forum:

"DO NOT post questions related to NT Batch scripting on this forum. Use the Programming forum.

Use the Windows NT, 2000 or XP forum for questions regarding the Windows NT, 2000 or XP "DOS" command prompt."


Report Offensive Follow Up For Removal

Response Number 2
Name: normie
Date: January 21, 2004 at 15:52:39 Pacific
Subject: Use Date time in Filename
Reply: (edit)
But that is just my point.

I want to know how to make this file work in Win98. Please read the message carefully before you post a critisism.


Report Offensive Follow Up For Removal

Response Number 3
Name: Wengier
Date: January 21, 2004 at 16:05:30 Pacific
Subject: Use Date time in Filename
Reply: (edit)
Normie,

"Until I try it on a Win98 machine. This bat file has been tested on XP and W2k.
Any ideas why it doesn't work."

This is your FIRST question (in Response #1), isn't it? The differences between DOS batch and NT script is why it doesn't work.

To answer your SECOND question ("how to make this file work in Win98") in Response #2, more details, especially the error messages, is needed to diagnose your problem more quickly and directly. So could you tell us the error messages you have seen when you run it in a Win98 DOS box?


Report Offensive Follow Up For Removal

Response Number 4
Name: Wengier
Date: January 21, 2004 at 16:15:12 Pacific
Subject: Use Date time in Filename
Reply: (edit)
By the way, in my responses, I have assumed that the network and the WCL_FTP tool have been installed and configured correctly on your Win98 machine as well. But if this presumption is not true, then it could also be the cause of the problem.

Report Offensive Follow Up For Removal

Response Number 5
Name: Wengier
Date: January 21, 2004 at 16:48:50 Pacific
Subject: Use Date time in Filename
Reply: (edit)
I have do some more research on the Internet about the WCL_FTP tool that he have used. Here is the offical desciption of this program from the website:

"WCL_FTP is a basic Windows Command Line FTP program. It was designed to do a very limited set of FTP commands, without user intervention. It is completely command line driven. What this means is that it is perfect for batch or automated programming or adding FTP capability to programs that need it. It works seamlessly with other programs, even taking a parameter on the command line that specifies the caption at the top or the ftp form, so it becomes part of your program. To use WCL_FTP, you simply create a shortcut to the program with the parameters as follows in the command line to start the program, or use a batch file to start it.

Supported platform: Win98/ME/2000/XP"

From the upper formal desciption for WCL_FTP, we can know this is a Windows command-line (Win32 Console) mode FTP program. It won't work in DOS (or pure DOS), so it's not really a DOS program. Thus you'd *better* ask your question in the Windows XP Forum, Windows 98 Forum or Networking Forum, rather than DOS Forum, and you have a better chance to be answered there than here. I'm trying to be more polite to redirect your question to the more appropriate forum. Good luck!


Report Offensive Follow Up For Removal


Response Number 6
Name: joe-g
Date: January 21, 2004 at 22:45:03 Pacific
Subject: Use Date time in Filename
Reply: (edit)
With the exeption of OS specific scripting, such as NT scripting, this is the forum for ALL flavours of DOS, (including "simulated DOS" since it still "walks like a duck...)

It may also belong in "programming", however, it also belongs here, so why criticise if you cant help?


Report Offensive Follow Up For Removal

Response Number 7
Name: Wengier
Date: January 22, 2004 at 05:12:55 Pacific
Subject: Use Date time in Filename
Reply: (edit)
joe-g,

I only said in Response #5 "you'd *better* ask your question in a different forum, rather than DOS Forum, and you have a better chance to be answered there than here.". I'm not saying "you must ask your question in ...". It seems that you didn't read my reply carefully. And I also said in Response #3 "To answer your SECOND question ("how to make this file work in Win98") in Response #2, more details, especially the error messages, is needed to diagnose your problem more quickly and directly." I'm waiting for his answer. So if you can't help, then please read my responses carefully before posting a reply.


Report Offensive Follow Up For Removal



Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Use Date time in Filename

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software




VGA Card in 386 clone - dip-switche

Video/Graphics problem

Ping on DOS 6.22

netgear, onelevel

Ping on DOS 6.22


The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC