Is there a way to get the file transfer progress using the move function in a Perl script?

I am an ETL developer, and I am dealing with a lot of data that needs to be processed from one form to another before it can be loaded into tables. Therefore, most of the scripts I work with at some point should move the file from one place to another. We are a windows shop. I was wondering if there is a way to see how long it takes when I use the move function in Perl. If I need to call the windows command through a system that will give me this option, then I use it well too. Is there anything on the Perl or Windows command line that tells me the progress of the file transfer?

Thanks!

+3
source share
1 answer

You can use Win32 :: FileOp package from cpan.

Here is the relevant passage:

Copyconfirm

 CopyConfirm ($FileName => $FileOrDirectoryName [, ...])
 CopyConfirm (\@FileNames => $DirectoryName [, ...] )
 CopyConfirm (\@FileNames => \@FileOrDirectoryNames [, ...])

Copies the specified files. In the event of a collision, it displays a confirmation dialog box. Shows Progress Dialogs.

Returns true if successful.

Moveconfirm

Moves the specified files. Parameters as CopyConfirm

Term:: ProgressBar, , . - : , ( ), .

+7

Source: https://habr.com/ru/post/1708595/


All Articles