Re: RE : Search for file / Check file properties

From: Wil Blake <wblake_at_emsys.net>
Date: Fri, 08 Aug 2008 05:19:53 -0400

Hi Roger,
As you hinted, I would use the bash or sh shell "find" command available in
Windows via Cygwin and also present in Mac (OS-X) and Linux. A stand-alone
find for Windows may also exist.

e.g find dir_path files changed in last 15 minutes and copy to dest_path

find dir_path -amin 15 -exec cp \{\} dest_path \;

e.g. find dir_path files newer than file file_path
find dir_path -newer file_path -exec cp \{\} dest_path \;

-Wil Blake
At 05:23 PM 8/7/2008, you wrote:
>Just learned XCOPY doesn't do what I want - the resolution of "newness" it
>reckognizes is 1 day or more.
>Leon: What's rsync?
>
>In the meantime guess I'll try looking at DIR...
>
>Roger
>
>
>On Thu, Aug 7, 2008 at 4:53 PM, Roger Levy <roger.levy_at_gmail.com> wrote:
>
> > Everyone, thanks for the suggestions.
> >
> > I was hoping to be able to do it in a semi-portable way. Shold've
> > mentioned that.
> >
> > I think that the simplest might be using a shell command, since the process
> > should translate to equivalent Mac and Linux commands ... (I hope???)
> >
> > Roger
> >
> >
> > On Thu, Aug 7, 2008 at 11:47 AM, Charles Melice <3d_at_forthcad.com> wrote:
> >
> >> Hi Roger,
> >>
> >> You know probably that the XCOPY.EXE command line do that for free...
> >>
> >> Charles
> >>
> >> -----Message d'origine-----
> >> De : sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com] De la part
> >> de
> >> Roger Levy
> >> Envoyé : jeudi 7 août 2008 16:55
> >> À : sftalk_at_forth.com
> >> Objet : [sftalk] Search for file / Check file properties
> >>
> >>
> >> Hi All,
> >> I wanted to implement an automatic resource-update facility, but I'm not
> >> sure how to do it in SwiftForth, or where to find out.
> >>
> >> I would like to be able to search for a file in a source directory and see
> >> if we need to copy it to a target directory.
> >>
> >> If the source file is found,
> >>
> >> 1. If it doesn't exist in the target directory, copy it and exit.
> >>
> >> 2. If it exists in the target directory and the source file is newer than
> >> the target file, copy it and exit.
> >>
> >> 3. Else do nothing and exit.
> >>
> >>
> >> Mostly I was just wondering what are the commands to use to 1.) find a
> >> file
> >> in a directory and 2.) check its Last Modified attribute.
> >>
> >> Roger
> >>
> >>
> >> ----------------------------------------------------------------------
> >> sftalk_at_forth.com The SwiftForth programming discussion email list
> >> To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.comFor
> >> list command help, send subject "help" to sftalk-request_at_forth.comMessage
> >> archives are located at http://www.forth.com/archive/sftalk
> >> ----------------------------------------------------------------------
> >> This list is a forum for SwiftForth users. For product support and bug
> >> reports, please send email to support_at_forth.com
> >> ----------------------------------------------------------------------
> >>
> >>
> >> ----------------------------------------------------------------------
> >> sftalk_at_forth.com The SwiftForth programming discussion email list
> >> To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
> >> For list command help, send subject "help" to sftalk-request_at_forth.com
> >> Message archives are located at http://www.forth.com/archive/sftalk
> >> ----------------------------------------------------------------------
> >> This list is a forum for SwiftForth users. For product support and
> >> bug reports, please send email to support_at_forth.com
> >> ----------------------------------------------------------------------
> >>
> >>
> >
>
>----------------------------------------------------------------------
>sftalk_at_forth.com The SwiftForth programming discussion email list
>To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
>For list command help, send subject "help" to sftalk-request_at_forth.com
>Message archives are located at http://www.forth.com/archive/sftalk
>----------------------------------------------------------------------
>This list is a forum for SwiftForth users. For product support and
>bug reports, please send email to support_at_forth.com
>----------------------------------------------------------------------

----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and
bug reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Fri Aug 08 2008 - 02:20:13 PDT


Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!

This archive was generated 07-Feb-2012. Archive updated nightly.