Jump to content

Copy directory / Copy all files of a directory


This topic is 4736 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hello,

I need to copy a directory and its content to an external drive. I've seen and experimented the CopyFile function of Scriptmaster. Two questions :



  1. Is there a way to adapt it to copy a directory by passing in src /Volumes/Data/Desktop/Xtine/for example ?
  2. If not is it possible to say copy all files (equivalent of use jokers *.*) ?

Thanks for your answers ?

Noël

Link to comment
Share on other sites

We are actually looking for same thing but we'd also like something that can compare the backup to the source (essentially looks at the backup folders and files and when there are changes in the source, update only what has changed - like a smart update backup function). Any thoughts?

Hello,

I need to copy a directory and its content to an external drive. I've seen and experimented the CopyFile function of Scriptmaster. Two questions :



  1. Is there a way to adapt it to copy a directory by passing in src /Volumes/Data/Desktop/Xtine/for example ?
  2. If not is it possible to say copy all files (equivalent of use jokers *.*) ?

Thanks for your answers ?

Noël

Link to comment
Share on other sites

Noel,

You can use a combination of the List All Files In Directory, List all Files Recursively, and Move or Rename File modules along with FileMaker scripting to do what you are looking for.

JLC,

There is not currently a module to do this that comes with scriptmaster. If you would like us to write an additional module or make a custom plugin for you to do this, please send an email to [email protected] along with details about what you need it to do and we will send you a quote.

Link to comment
Share on other sites

Noel,

You can use a combination of the List All Files In Directory, List all Files Recursively, and Move or Rename File modules along with FileMaker scripting to do what you are looking for.

I'll try to understand and perhaps build he solution you describe... but I'm at a small level !

Noël

Link to comment
Share on other sites

The lazy way ...

Commons-IO-2.0.1.Jar

// Usage : CopyDirectory ( fm_source ; fm_destination )

// 2011_04_10

// v1

// jar : Commons-IO-2.0.1.Jar @ http://commons.apache.org/io/



import org.apache.commons.io.FileUtils

 

source = new File( fm_source );

destination = new File( fm_destination );

try {

    FileUtils.copyDirectory( source , destination  )

    return 1

} catch (IOException e) {

    return e

}

  • Like 1
Link to comment
Share on other sites

This topic is 4736 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.