MS OS - Microsoft Forum to Usenet Gateway Header Right
Navbar Left Navbar Right


hi, i am writing script to transfer files from FTP server using inbuilt FTP utility commands.On FTP server files that i want to copy resides in a folder with the



Reply
Old 10-10-2008, 12:31 AM   #1
pandurang
Guest
 
Posts: n/a
Default transfering file using FTP commands

hi,

i am writing script to transfer files from FTP server using inbuilt FTP
utility commands.On FTP server files that i want to copy resides in a folder
with the name as 100308 it is 3rd October 2008(mmddyy) so can you tell me how
to get the Date of FTP server and extract the month,date and year from the
system date so that i will create a string by concatenating month,date and
year and will copy the whole folder that will match with the string. I was
not able to find the date command in FTP.
i also need to extract the minutes and hours from the date using FTP command.
Do we need to change to the shell of the FTP server and get the date.

Also can i copy the whole folder using FTP commands??? if not what should i
use to copy the whole folder???


 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-10-2008, 08:51 AM   #2
Tim Slattery
Guest
 
Posts: n/a
Default Re: transfering file using FTP commands

pandurang <pandurang@discussions.microsoft.com> wrote:

>i am writing script to transfer files from FTP server using inbuilt FTP
>utility commands.On FTP server files that i want to copy resides in a folder
>with the name as 100308 it is 3rd October 2008(mmddyy) so can you tell me how
>to get the Date of FTP server and extract the month,date and year from the
>system date so that i will create a string by concatenating month,date and
>year and will copy the whole folder that will match with the string. I was
>not able to find the date command in FTP.


I think you'd have to run some process that would build your FTP
command script dynamically. It could be C, C++, Perl, whatever you're
comfortable with. (I'm not sure a shell script - *.bat or *.cmd file -
can manipulate strings like that.) The process would construct the
directory name, then use that to write the FTP command file, then
invoke FTP.

>i also need to extract the minutes and hours from the date using FTP command.
>Do we need to change to the shell of the FTP server and get the date.


I think your stuck there, as long as you're using FTP. I don't think
you can "shell out" to the server.

>Also can i copy the whole folder using FTP commands??? if not what should i
>use to copy the whole folder???


Once you CD into the directory, you can use the MGET command to get
all the files.

--
Tim Slattery
MS MVP(Shell/User)
Slattery_T@bls.gov
http://members.cox.net/slatteryt
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Documenting how screwed up Vista REALLY is with file transfering TruthSquad@hope.com Windows Vista 3 08-30-2008 07:43 PM
Transfering Files from old CPU to new CPU Kris Windows XP 3 07-03-2008 02:39 AM
transfering info acetoolguy Windows XP 11 05-03-2008 02:06 AM
Multiple commands in batch file loop mrgou Windows Vista 6 03-13-2008 05:55 PM
transfering files from 3 log-in into 1 log-in besbabe Windows XP 2 11-06-2007 08:20 AM


All times are GMT -5. The time now is 01:08 PM.


Powered by vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Skin designed by CompletevB
Copyright © 2005-2008 Robert Schwarz, Sr. - All rights reserved - MS OS is an independent web site and is not affiliated with Microsoft Corporation.