file-copy

Copy a file without using the windows file cache

Anybody know of a way to copy a file from path A to path B and suppressing the Windows file system cache? Typical use is copying a large file from a USB drive, or server to your local machine. Windows seems to swap everything out if the file is really big, e.g. 2GiB. Prefer example in C#, but I'm guessing this would be a Win32 call of so...

Windows Explorer's Busy cursors and give-up copy operations - why?

Can anyone please enlighten me as to why windows explorer is so, well, synchronous. Why are there so many operations that cause busy cursors. Also, can anyone understand why directory-copy needs to be as broken as it is, after all these years, can't something be done?! If I copy a directory and there's a file in that directory being lo...

Why do I get this ERROR_NO_TOKEN when I call WINAPI's CopyFile on deep paths?

This is a follow up to my previous question. After taking the solution to the previous question, I got an error code (1008: ERROR_NO_TOKEN) when copying a file with a 1300 character path. After googling and reading msdn, this doesn't seem to be a solid solution to this problem. The error seems to be tied to thread and process privileg...

How to copy file from local system to other system in C# (windows app)?

I need to load help files from my windows C# application and move/copy to other system (to its local drive). Application (same C# windows application) on the local system will use it for help. What needs to be done to accomplish this? I understand File.Copy() but i don't know, will it hold for remote system also? ...

How do I copy a remote image in python?

I need to copy a remote image (for example http://site.com/image.jpg) to my server. Is this possible? How do you verify that this is indeed an image? ...

write to batch file to read text in a file and copy to other text file

I want read a text file on client workstation and copy that text to a text file with that workstation no. this process I need to do for 500+ workstations. I am having a NOde licence server and I updated its version so now I need to update clients also . after updating the client one file created at c:\ I need to read that file and copy ...

Performant File Copy in C#?

I have a huge directory of about 500k jpg files, and I'd like to archive all files that are older than a certain date. Currently, the script takes hours to run. This has a lot to do with the very piss-poor performance of GoGrid's storage servers, but at the same time, I'm sure there's a way more efficient way Ram/Cpu wise to accomplish...

java - effective files copying

hi. i would like to know which is the best way to copy large number of files. ...

CamelContext.start() doesn't block

Hi, I want to run a simple Apache Camel example that copies files from one directory to another: CamelContext context = new DefaultCamelContext(); context.addRoutes(new RouteBuilder() { public void configure () throws Exception { from("file://c:/fromdir/").to("file://c:/todir/"); } }); context.start(); If I run this example...

Copying files which the main thread adds to a stringlist using a thread

I have a web creation program which, when building a site, creates hundreds of files. When the internet root folder is situated on the local pc, the program runs fine. If the internet root folder is situated on a network drive, the copying of a created page takes longer than creating the page itself (the creation of the page is fairly ...

Can't copy big DB files using "copy", "robocopy" or even "eseutil"

I am having a problem copying large DB files (~100GB) in an automated script I am trying to write for a Windows Server. I have tried using "copy", "robocopy", and even "eseutil". My script is running on a Windows 2008 Server (destination of the file) and is pulling from a Windows 2003 Server (source of the file). I have already tried...

How to copy attachments from a List into a document library via workflow activity

Hi there, I currently have a task list, some of them contain file attachments. As part of a new workflow I'm creating in MOSS Designer I need to copy the attachments to files in a document library. What is the best way to do this? Is there an activity already made for this? Thanks! ...

What does "Insufficient system resources..." error mean?

This question spans both serverfault and stackoverflow so I just picked this one. I get the following exception with some simple file copy code. Its running on Windows Server 2003 x64 Caused by: java.io.IOException: Insufficient system resources exist to complete the requested service at sun.nio.ch.FileDispatcher.pwrite0(Native Method...

Python: Checking when shutil.copyfile is done

Hello I have a such code: for file in file_list: shutil.copyfile(file,newpath) #do further actions And here is the question, at #do further actions I use the copied f iles thus I need to make sure the shutil.copyfile functions finish their task. How can I make sure of this ? ...

how can i write a script to find the latest updated file and copy to certain directory

i have a process that downloads a file from a webbrower. it has the same name always (can't change that) so each file gets downloaded as file([latestnumber]) so in this directory i have: joe.pdf joe(1).pdf joe(2).pdf etc . . . I now would like a script to take the "latest file" (joe(2).pdf in this case) and copy it to another direc...

How to copy a file to portable drive root with cocoa?

I've tried the following [[NSFileManager defaultManager] copyItemAtPath:@"whatever.txt" toPath:@"/Volumes/MyDrive" error:&copyError]; This gives me the error "The operation couldn’t be completed. File exists" If I try to copy it to "/Volumes/MyDrive/testFolder" everything copies to testFolder just fine. ...

NSFileManager contentsEqualAtPath:andPath: compare checksum data

Does the NSFileManager method contentsEqualAtPath:andPath: create a dynamic checksum to compare two files, does it open the file header and compare file header details or does it use some other method for comparing? I have a list of 200,000 or so files to compare where the local files are to be compared with the files on a remote server...

determing file object size before using file object

I am attempting to determine the size of a downloaded file in python before parsing and manipulating it with BeautifulSoup. (I intend to update to ElementTree soon, but having briefly played with it, it does not solve the problem I am posing here, as far as I can see). import urllib2, BeautifulSoup query = 'http://myexample.file.com/fil...