|
|
 |
Re: FN-FORUM WSH and FTP
date posted 24th January 2002 16:15
Urrggh. My brain's fried, I've just been talking to Customs and Excise about
importing something from Canada. Jeez! Lovely people, but what a hassle.
Anyway, ADSI/WSH is probably easier if you have to mess around, but just for
fun, here is a batch file (or part of one) for NT that allows you to name a
file by date (eg 020124.txt), you could technically use the same method to
get filename of a log file.
rem =====================================================
rem === Get Current Date and Previous Date
rem === Last Modified On 03 Feb 99
rem =====================================================
:GetDate
FOR /F "TOKENS=2" %%D IN ('DATE /T') DO SET @DATE=%%D
SET @[EMAIL REMOVED]@DATE:~8,2%
SET /A @[EMAIL REMOVED] - 1
SET @[EMAIL REMOVED]@[EMAIL REMOVED]
SET @[EMAIL REMOVED]@[EMAIL REMOVED]
Now you can copy a file to [EMAIL REMOVED] and it will have the
current date in YYMMDD format.
Have you tried ShellExec to call ftp (remember that you can put all your ftp
commands in a text file) from wsh--remember I'm not a developer!!
Kathy
----- Original Message -----
From: "Norman Beresford" [EMAIL REMOVED]
To: [EMAIL REMOVED]
Sent: Thursday, January 24, 2002 3:08 PM
Subject: RE: FN-FORUM WSH and FTP
> Hi Kathy
>
> I'm not too hot on batch files with NT (Or any OS for that matter).
Because
> the log file will be named differently every day I assumed I'd have to do
it
> using WSH, or could I have an intelligent batch file handle it for me? If
> so, how? :)
>
> Thanks for you help so far
>
> Norman
>
> > -----Original Message-----
> > From: [EMAIL REMOVED]
> > [EMAIL REMOVED] Behalf Of Vendetta Sales
> > and Admin
> > Sent: 24 January 2002 14:41
> > To: [EMAIL REMOVED]
> > Subject: Re: FN-FORUM WSH and FTP
> >
> >
> > ShellExec to cmd.exe to ftp -s:commandfile.txt or something like
> > that? Would
> > a batch file be easier?
>
>
> ===============================================================
> = SAVE TIME *AND* MAKE MONEY! with Neutralize (**): =
> = Generate bespoke quotes for Online Marketing Services. =
> = Resellers info at http://www.neutralize.com & 01209 210 910 =
> ===============================================================
>
> **************************************************************
> *** Sponsor the forum for as little as £1 at: ***
> *** ***
> *** http://www.freelancers.net/cgi/sponsor.cgi?action=show ***
> **************************************************************
>
>
> Freelancers and Freelance Jobs:
> http://www.freelancers.net
>
> Forum FAQs:
> http://freelancers.netrickery.com
>
> To unsubscribe please email:
> [EMAIL REMOVED]
>
> If you have difficulties unsubscribing please email:
> [EMAIL REMOVED]
>
|
 |
|