recursive move directories
Authored by
mfwolffe <wolffemf@dukes.jmu.edu>
- SHA
89ebff6a04b849b3f76e205b72352e0afb7dbcef- Parents
-
503dae0 - Tree
ef396c9
89ebff6
89ebff6a04b849b3f76e205b72352e0afb7dbcef503dae0
ef396c9| Status | File | + | - |
|---|---|---|---|
| M |
app/main.f90
|
4 | 5 |
| A |
scratchdir/scratch/one.txt
|
0 | 0 |
| A |
scratchdir/scratch/two.txt
|
0 | 0 |
app/main.f90modified@@ -294,9 +294,8 @@ program fortress | ||
| 294 | 294 | call execute_move_file(move_source_path, current_dir, current_files(move_dest_selected), & |
| 295 | 295 | current_is_dir(move_dest_selected)) |
| 296 | 296 | move_mode = .false. |
| 297 | - else if (.not. current_is_dir(selected) .and. & | |
| 298 | - trim(current_files(selected)) /= "." .and. trim(current_files(selected)) /= "..") then | |
| 299 | - ! Enter move mode - store source file | |
| 297 | + else if (trim(current_files(selected)) /= "." .and. trim(current_files(selected)) /= "..") then | |
| 298 | + ! Enter move mode - store source file or directory | |
| 300 | 299 | move_source_path = join_path(current_dir, current_files(selected)) |
| 301 | 300 | move_source_name = current_files(selected) |
| 302 | 301 | move_mode = .true. |
@@ -434,12 +433,12 @@ contains | ||
| 434 | 433 | write(output_unit, '(a)') BOLD // "Move Result" // RESET |
| 435 | 434 | write(output_unit, *) |
| 436 | 435 | if (stat == 0) then |
| 437 | - write(output_unit, '(a)') GREEN // "✓ File moved successfully!" // RESET | |
| 436 | + write(output_unit, '(a)') GREEN // "✓ Moved successfully!" // RESET | |
| 438 | 437 | write(output_unit, '(a)') " From: " // trim(source_path) |
| 439 | 438 | write(output_unit, '(a)') " To: " // trim(dest_path) |
| 440 | 439 | else |
| 441 | 440 | write(output_unit, '(a)') RED // "✗ Move failed" // RESET |
| 442 | - write(output_unit, '(a)') " (file may already exist or invalid destination)" | |
| 441 | + write(output_unit, '(a)') " (destination may already exist or be invalid)" | |
| 443 | 442 | end if |
| 444 | 443 | write(output_unit, *) |
| 445 | 444 | |
scratchdir/scratch/one.txtaddedscratchdir/scratch/two.txtadded