Re google - try keyset of
bypass windows long filename limits

- prefix the normal fullname with \\?\
As in \\?\C:\path\name\file.name

Maybe that would be accepted by the program you are using - maybe not

Maybe the zip facility - or a similar 'packaging' program would process the 
files into an archive and allow you to unpack the archive structure to a single 
folder.

For dealing with individual files - a manual process using subst, or hard links 
and/or junctions 

And - there is also the use of accented characters - and capitalisation within 
the filenames - where the copy of the file actually gets it's name changed to 
conform to the processing facility (OS) consideration of correct UNC 
characterset.

Further annoyance - especially if having the file list manipulated within Excel
Filenames can contain unexpected characters such as non-space whitespaces, and 
can start with a space 
An = or @ or + or - and it ain't happy with names like 1.4e-3 either
Try the 'DOS command
rename "file" " file"
and using the alt key and the numeric keypad to enter characters in the 
filename - backspace is a good one!

On current filesystems NTFS FAT32, and CD/DVD anticipate Windows sometimes 
keeping the long file name including extended characters in the code page used 
for the name creation, and sometimes not!

And - there is the horror of alternate data streams (File streams) where the 
normally disallowed characters may be allowed in the filename.

A good clue to the use of filestreams is that there is space use from the 
partitions expected space that is not shown by the file management facilities 
such as dir and explorer 
And hard links - where there is more space allocated for files than the space 
on the partition - and there are apparently lots of duplicates of files, but 
deleting them does not add to the freespace  

You may also find the description of the \\.\ prefix a good read.

Please let the list know if the \\?\ works in your environment 

JimB



-----Original Message-----
From: [email protected] [mailto:[email protected]] On 
Behalf Of Kurt Buff
Sent: Wednesday, August 05, 2015 7:24 PM
To: [email protected]
Subject: Re: [powershell] Re: Need some pointers on an exercise I've set for 
myself

The OS is 2012R2, and powershell is v4.

The problem is the Win32 API, on which PS apparently relies. As the
error message indicates, there are limitations inherent for that API.

The tool I've used to work with this is robocopy, which uses the
native API, and doesn't suffer under such a small restriction.

Kurt



================================================
Did you know you can also post and find answers on PowerShell in the forums?
http://www.myitforum.com/forums/default.asp?catApp=1

Reply via email to