I have a database called foo and a database called bar. I have a table in foo called tblFoobar that I want to move (data and all) to database bar from database foo. What is the SQL statement to do this?
...
By default, copying from the command prompt will prompt you to overwrite files that already exist in the target location.
You can add "/Y" to say "Yes to all" replacements.
But how can you say "No to all" ?
In other words, I want to copy everything from one directory that does not already exist in the target.
The closest thing I see ...
I've a windows service that updates our product. It copies the product files into a temp directory, usually "C:\Windows\Temp", patches the binaries, and then uses MoveFileEx to copy the files back to the install directory on a reboot, usually "C:\Program Files\Product". The files in the install directory are inheriting their security att...
Once again a very beginner-ish question, but here I go:
I would like to use a servlet or similar to copy an uploaded file (from an html file select) to a permanent location. This is all I need to do with the file. I am currently going with using the Apache Commons FileUpload and IO libraries. Is there no easier or more elegant solution?...
I have to copy quite a lot of files from one folder to another. Currently I am doing it in this way:
string[] files = Directory.GetFiles(rootFolder, "*.xml");
foreach (string file in files)
{
string otherFile = Path.Combine(otherFolder, Path.GetFileName(file));
File.Copy(file, otherFile);
}
Is that the most efficient way? Seem...
I have a project that is stored in a Subversion repository.
In this repository, in a different folder, I have a set of libraries that I use in many of my projects. These libraries are stored as binary files, ie. the dll's, pdb's, and xml's.
Here's an example layout:
<repo-url>
\Libraries
\SQLite
\SystemHooks
...
How do I copy a directory including sub directories excluding files or directories that match a certain regex on a Windows system?
...
What is the best way in Perl to copy files to a yet to be created destination directory tree?
Something like
copy("test.txt","tardir/dest1/dest2/text.txt");
wont work since the directory tardir/dest1/dest2 does not yet exist.
What is the best way to copy with directory creation in Perl?
...
I know the statement:
create table xyz_new as select * from xyz;
Which copies the structure and the data, but what if I just want the structure?
...
I want to be able to selectively copy a list of files and preserve their directory structure. The problem is that there are quite a few files that their path exceeds 256 character. How is this problem usually handled?
Edit:
I should make it clear that I only want to selectively copy files, not folders. I don't think robocopy can be e...
In cmd.exe, I can execute the command "copy c:\hello.txt c:\hello2.txt" and it worked fine.
But in my C program, I ran this piece of code and got the following error:
#include <iostream>
using namespace std;
int main()
{
system("copy c:\hello.txt c:\hello2.txt");
system("pause");
return 0;
}
Output:
The system cannot fi...
I have an array of values that is passed to my function from a different part of the program that I need to store for later processing. Since I don't know how many times my function will be called before it is time to process the data, I need a dynamic storage structure, so I chose a std::vector. I don't want to have to do the standard...
Via command line, I usually do this:
cp -rRp /path/to/a_folder/. /path/to/another_folder
This copies just the contents underneath a_folder to another_folder. In SVN I need to do the same thing, but can't figure it out. I always end up with this:
/path/to/another_folder/a_folder
SVN throws up even when I try this:
svn copy file:///pa...
I'm kind of new to C++ and have some questions, this is one of them.
Is there ANY reason when you are using a function that takes in one or several parameters, parameters of which you know will always be stored in a variable before the function call, to pass a copy of the variable, rather than a pointer to the variable?
I'm talking in...
I have a not-so-small class under development (that it changes often) and I need not to provide a public copy constructor and copy assignment.
The class has objects with value semantics, so default copy and assignment work.
the class is in a hierarchy, with virtual methods, so I provide a virtual Clone() to avoid slicing and to perform ...
Is there a way to copy an entire directory to the output directory in a console application in C#.NET?
I know for files you can right click them, properties and mark copy to output directory. But I'm not going to do that for 20.000 files...
Thx, Lieven Cardoen aka Johlero
...
Hello all,
I’m currently using the OpenNETCF.Desktop.Communication.dll to copy files from my desktop to a CE device, but I keep getting an error:
‘Could not create remote file’
My development environment is VS2005 (VB.NET)
My code:
ObjRapi.Connect()
ObjRapi.CopyFileToDevice("C:\results.txt", "\results.txt")
ObjRapi.Dispose()
ObjRapi...
I've got two branches of code. 1 has a dialog box that the other doesn't, but because of politics the dialog box wasn't moved into the newest branch. Now they want it in...
So is it possible to copy a dialog box from one project to another.
There apears to be an export and import feature however it's greyed out.
...
I need to automatically copy files from a linux machine to a windows one every day.
I'm looking for something simple and secure like scp, rsync, sftp. Unfortunately, I'm at a loss of how to set this up on the Windows machine.
Does anyone know how to do this?
...
I'd like to copy the files that have a specific file extension to a new folder. I have an idea how to use os.walk but specifically how would I go about using that? I'm searching for the files with a specific file extension in only one folder (this folder has 2 subdirectories but the files I'm looking for will never be found in these 2 su...