- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to get only todays file from Window 2003 f...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 09:48 PM
тАО03-04-2009 09:48 PM
Good Morning.
I have to get only current dates csv file from Windows m/c.
1) Script i am using is:
#!/bin/sh
HOST='XXXXXXX'
USER='xxxx'
PASSWD='ppppp'
ftp -n -v $HOST > /usr/mydir/ftp.log << ENDFTP
user $USER $PASSWD
prompt off
binary
cd /wwwroot/
lcd /usr/mydir/
mget *.txt
quit
*******************************
Can some one help me to update the script ?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 10:13 PM
тАО03-04-2009 10:13 PM
Re: How to get only todays file from Window 2003 from ftp?
OR
Get all the files in to a temp dir (assuming they are not too big) and only copy the ones you want to /ust/mydir. Then remove the temp dir?
There may be a way with ftp but I am not aware of it. Have you looked on google for options to mget?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 10:15 PM
тАО03-04-2009 10:15 PM
Re: How to get only todays file from Window 2003 from ftp?
Could you have a script on the windows machine that renames the files to include the date string?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 10:22 PM
тАО03-04-2009 10:22 PM
Re: How to get only todays file from Window 2003 from ftp?
link to the file) placed on the other
(Windows) system in a date-labeled directory,
like, say, "2009-03-04". This would make it
pretty easy to find the desired file (or
files).
Otherwise, I might replace "mget *.txt" in
that script with "dir", save the result, then
look through it for files with the right
date. Finally, create a script which fetches
the desired files.
Looking through FTP directory listings can be
complex, which is one good reason to solve
the problem at the other end.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 10:46 PM
тАО03-04-2009 10:46 PM
Re: How to get only todays file from Window 2003 from ftp?
Can i do something like?
1) Let say dir contains todays date files only. I will get all files throgh mget and then move the all the file from current dir to backup dir on windows. Then their wontbe any files left.
Bu can you help me whci command should i use to move the files to other dir.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 10:58 PM
тАО03-04-2009 10:58 PM
Solutionftp has a del command to remove files. I don't think it has a move command.
If this was HP-UX and both directories were in the same filesystem, you would just hardlink them before and then remove them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 11:03 PM
тАО03-04-2009 11:03 PM
Re: How to get only todays file from Window 2003 from ftp?
Can we copy files from one dir to other and then delete. FtP servre in windows 2003 server?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 11:17 PM
тАО03-04-2009 11:17 PM
Re: How to get only todays file from Window 2003 from ftp?
Yes, you could copy from windows to HP-UX, then copy back to another folder on windows, then remove original.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2009 06:08 AM
тАО03-05-2009 06:08 AM
Re: How to get only todays file from Window 2003 from ftp?
> files to other dir.
> [...] I don't think it has a move command.
> [...]
"man ftp". Look for "rename". (You know,
like the RENAME command on a user-friendly
OS.) I'd expect most FTP servers to support
it well enough to rename a file to a
different directory, but I'd run the
experiment on the server in question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2009 09:52 AM
тАО03-05-2009 09:52 AM