I am using perl
to do some processing of files. We copy the files from particular location and we do some processing on each file and then we copy the files to the processed location. If in the source destination if we have the folders then we will create the same structure in the destination folder as well. In the perl
script we use createDirectoryw
to create the folder structure.
use Win32::API;
use Encode qw(decode encode);
use Encode::Unicode; # GBR
use Symbol qw( gensym );
use Win32API::File qw(CreateFileW OsFHandleOpen CREATE_ALWAYS GENERIC_WRITE);
$cd = Win32::API->new( 'kernel32', 'CreateDirectoryW', 'PP', 'N' );
...
..
..
my $UTF16_dirname = encode( "UTF-16LE", "$dirname\0" );
my $res = $cd->Call( $UTF16_dirname, 0 ) ;
I got the $res as 0
, it didn't create the folder.