Go Back   Microsoft Operating System Forum > Microsoft Operating System > Windows XP

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


Microsoft OS Forum to Usenet Gateway is a gateway to Microsoft Windows operating system newsgroups. If you use Windows XP, Windows Vista or any other Microsoft Operating System then this is the community for you.
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact us.

Once you register you'll stop seeing this message.
Log in

Reply
 
Thread Tools Display Modes
Old 10-09-2008, 11:31 PM   #1
pandurang
Guest
 
Posts: n/a
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, 07:51 AM   #2
Tim Slattery
Guest
 
Posts: n/a
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
Reply

Tags
commands, file, ftp, transfering



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
Multiple commands in batch file loop mrgou Windows Vista 7 02-18-2009 05:59 AM
Documenting how screwed up Vista REALLY is with file transfering TruthSquad@hope.com Windows Vista 3 08-30-2008 06:43 PM
Transfering Files from old CPU to new CPU Kris Windows XP 3 07-03-2008 01:39 AM
transfering info acetoolguy Windows XP 11 05-03-2008 01:06 AM
transfering files from 3 log-in into 1 log-in besbabe Windows XP 2 11-06-2007 07:20 AM




This is a Schwarz Network site.

All times are GMT -5. The time now is 08:56 PM.
Designed by: vBSkinworks