Managing local files
In this section we will look at local file operations. We'll cover common operations that all computer users will be familiar with—copying, deleting, moving, renaming, and archiving files. We'll also look at some not-so-common techniques, such as timestamping files, checking for the existence of a file, and listing the files in a directory.
Copying files
For our first file job, let's look at a simple file copy process. We will create a job that looks in a specific directory for a file and copies it to another location.
Let's do some setup first (we can use this for all of the file examples). In your project directory, create a new folder and name it FileManagement
. Within this folder, create two more folders and name them Source
and Target
. In the Source
directory, drop a simple text file and name it original.txt
. Now let's create our job:
Create a new folder in Repository and name it
Chapter6
.Create a new job within the
Chapter6
directory and name itFileCopy
.In the Palette...