Skip to content
/ copy64 Public

Powershell script to copy files in paths longer than 260 characters

License

Notifications You must be signed in to change notification settings

gth/copy64

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

copy64

Powershell script to copy files to/from paths longer than 260 characters.

Draft objectives (to get this repository into a workable state)

  • central storage of various examples and works-in-progress
  • collate main code into a single working source file
  • establish version control

General objectives:

  • use Powershell functions and, where possible, operate on as many Powershell versions as possible
  • overcome the Windows bugs around a directory path longer than 260 characters (e.g. the kind where Windows Explorer drag-and-drop copying fails)
  • a graphical user interface, for simplicity and nice overall clarity
  • support multiple sources
  • support multiple destinations
  • a trace log on screen, for detailed status and troubleshooting
  • a log file, to keep a record of what happened (do you remember if you already copied that really large file, successfully?)
  • currently using the built-in Copy-Item, which handles long paths (good) but locks up the GUI until it has finished (bad),
  • handle local or network drives
  • stream-based copying, to provide progress indication (i.e. GUI progress bar), using CopyFileEx

Next release goals:

  • launch the copy task(s) as a separate process, to keep the GUI responsive
  • stream-based copying using CopyFile2 (improved function?)
  • time elapsed
  • estimated time remaining
  • check just prior to running copy task, that: -- target folder exists -- source item (still) exists

Future goals:

  • save current source(s) and destination(s) values
  • command-line options, for possible automation
  • retry functionality (e.g. if network links drop and manual intervention is needed to fix them)
  • simple verification (e.g. based on file attributes)
  • hash-based verification (e.g. MD5, SHA1, SHA256)
  • move files, not just copy
  • functionality to resume previous execution (e.g. Windows crashed, or system power loss)
  • multi-threaded, if possible

Reference Links Some Powershell, .NET and related github links:

Code Sample Links

About

Powershell script to copy files in paths longer than 260 characters

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published