copyfile

What is wrong with my WINAPI call to handle long file paths?

I've been trying to figure out the best way to copy files in Windows with deep paths (files, not folders so robocopy is out of the question). The best solution I've been able to come up with is writing my own solution. I've been able to write the code to handle listing directories with 10,000 character deeps paths but using the same ap...

Performance issues using Copyfile() to copy files from different computers

Useing VC++ VisualStudio 2003. I'm trying to copy several image files (30kb or so per file) from another computer`s shared folder to a local file. The problem is that there can be more than 2000 or so files in one transfer, and it seems to take its toll, substantially taking more time to complete. Is there any alternate method of copy...

CopyFileExW in Ruby

Does anyone have a code sample that shows how to use the Win32 function CopyFileExW in ruby? The difficulty i am having is declaring the 'ProgressRoutine' call back function correctly without getting a segfault. I can use CopyFileW without issue, but CopyFileExW is causing grief. require 'windows/error' require 'windows/wide_string' re...

by using copyfile element files cant not bind into msi package

Hello, i am using wix 3.0.i have a folder name "images".so i want to copy all the files from images into msi package.when i copy all the file and install msi to another PC then it did not bind the images. And when i use simple File Element then the files bind to msi package. so what should i do, Reply me soon Thanking You Sami...

How files are copying at the low level?

Hi everybody, I have a small question: For example I'm using System.IO.File.Copy() method from .NET Framework. This method is a managed wrapper for CopyFile() function from WinAPI. But how CopyFile function works? It is interacts with HDD's firmware or maybe some other operations are performed through Assembler or maybe something other....

Vista copyfile is copying into VirtualStore folder

Hello I have created one application on Vista, that is running with admin privileges. I am trying to copy one file to ProgramData\Application\ folder. But instead to copying there its copying at location c:\Users\XXX\AppData\Local\VirtualStore\ProgramData\Application\ I dont want this file to get copied into Virtul store. Any suggesti...

Using windows CopyFile function to copy all files with certain name format

Hello! I am updating some C code that copys files with a certain name. basically, I have a directory with a bunch of files named like so: AAAAA.1.XYZ AAAAA.2.ZYX AAAAA.3.YZX BBBBB.1.XYZ BBBBB.2.ZYX Now, In the old code, they just used a call to ShellExecute and used xcopy.exe. to get all the files starting with AAAAA, they just gave xc...

CopyFileEx with multiple files, but only one copy dialog

Hello everyone, I've searched the web and stackoverflow for this. I want to copy multiple files from multiple sources to multiple destinations. I don't bother with UnauthorizedAccessExceptions yet - the files are most likely to not be in use anyway. I can copy 1 file using CopyFileEx-Wrapper from here. However: I'd like the standard w...

copy a file using UNC and impersonation

Hello, I want to use FileInfo and CopyTo to move some files across a network. I have to move the files to a share on a server that has to be accessed using a particular user account. How do I do this - do I have to impersonate that user and then do the copy? I am using .net 4 and was wondering what the best way accomplish the imperson...