Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a background processor 1

Status
Not open for further replies.

jcastilletti

Programmer
Jan 16, 2001
7
US
I would like to create a program which will run all day long looking for certain files in a certain directory.
These files will have been placed in the directory through an outside service using FTP.

Once this program sees files in this directory it will move them out of the directory and into another after the files have been encyrpted using pretty good privacy (PGP).

Any ideas or clues as to I start with this task.

Any Help is greatly appreciated.

John
 
Do a regular program, that checks for new files at a specified interval using the timer control.

Simple and effecient.

-Mats
 
How do I monitor a directory for files.
If files present how do I pass each one off into an ecrytion program (PGP).

Thanks...John
 
Use the dir function to check for files (see below for example) and shell function to encrypt each file.

Code:
Dim MyFile, MyPath, MyName
' Returns "WIN.INI"  if it exists.
MyFile = Dir("C:\WINDOWS\WIN.INI")   

' Returns filename with specified extension. If more than one *.ini
' file exists, the first file found is returned.
MyFile = Dir("C:\WINDOWS\*.INI")

' Call Dir again without arguments to return the next *.INI file in the 
' same directory.
MyFile = Dir

' Return first *.TXT file with a set hidden attribute.
MyFile = Dir("*.TXT", vbHidden)
Good Luck
-Mats
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top