2025-01-08 17:02:29 -06:00
|
|
|
|
2025-01-08 20:49:37 -06:00
|
|
|
# Folder Copy Utility
|
2025-01-08 17:02:29 -06:00
|
|
|
|
2025-01-08 20:49:37 -06:00
|
|
|
This Visual Basic application provides functionality to copy folders and track files in a database.
|
2025-01-08 17:02:29 -06:00
|
|
|
|
2025-01-08 20:49:37 -06:00
|
|
|
## Form Components
|
2025-01-08 17:02:29 -06:00
|
|
|
|
2025-01-08 20:49:37 -06:00
|
|
|
- Source and destination path text boxes
|
|
|
|
- Copy Folder command button
|
|
|
|
- File listing controls (ListBox, FileListBox)
|
|
|
|
- DataGrid connected to EGSHP1A0 table via ODBC
|
|
|
|
- Read File Names command button
|
2025-01-08 17:02:29 -06:00
|
|
|
|
2025-01-08 20:49:37 -06:00
|
|
|
## Key Functions
|
2025-01-08 17:02:29 -06:00
|
|
|
|
2025-01-08 20:49:37 -06:00
|
|
|
### Folder Operations
|
|
|
|
- `Command1_Click()` - Initiates folder copy operation
|
|
|
|
- `Copydir()` - Copies folder contents using FileSystemObject
|
|
|
|
- `DeleteDir()` - Deletes source folder after copy
|
|
|
|
- `KillDir()` - Wrapper for folder deletion
|
2025-01-08 17:02:29 -06:00
|
|
|
|
2025-01-08 20:49:37 -06:00
|
|
|
### File Tracking
|
|
|
|
- `cmdReadFileNames_Click()` - Reads files in destination folder and updates database
|
|
|
|
- Records stored in EGSHP1A0 table with fields:
|
|
|
|
- HFLD# (Folder name)
|
|
|
|
- HPRD# (Product number)
|
|
|
|
- HHEX (File name)
|
|
|
|
- HENTD (Entry date)
|
2025-01-08 17:02:29 -06:00
|
|
|
|
2025-01-08 20:49:37 -06:00
|
|
|
### Win32 API Functions
|
|
|
|
Uses Windows API calls for file operations:
|
|
|
|
- CreateDirectory
|
|
|
|
- CopyFile
|
|
|
|
- FindFirstFile/FindNextFile
|
|
|
|
- FindClose
|
2025-01-08 17:02:29 -06:00
|
|
|
|
|
|
|
## Dependencies
|
2025-01-08 20:49:37 -06:00
|
|
|
- MSAdodc control for database connectivity
|
|
|
|
- MSDataGrid control for data display
|
|
|
|
- FileSystemObject for folder operations
|