Search Results

Search found 34816 results on 1393 pages for 'copy on write'.

Page 10/1393 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Copy only files that are newer

    - by ErocM
    I am currently using this code: if (!Directory.Exists(command2)) Directory.CreateDirectory(command2); if (Directory.Exists(vmdaydir)) Directory.Delete(vmdaydir,true); if (!Directory.Exists(vmdaydir)) Directory.CreateDirectory(vmdaydir); var dir = Path.GetDirectoryName(args[0]); sb.AppendLine("Backing Up VM: " + DateTime.Now.ToString(CultureInfo.InvariantCulture)); Microsoft.VisualBasic.FileIO.FileSystem.CopyDirectory(dir, vmdaydir); sb.AppendLine("VM Backed Up: " + DateTime.Now.ToString(CultureInfo.InvariantCulture)); As you can see, I am deleting the directory, then I am copying the folder back. This is taking way to long since the directory is ~80gb in size. I realized that I do not need to copy all the files, only the ones that have changed. How would I copy the files from one folder to another but only copying the files that are newer? Anyone have any suggestions? ==== edit ==== I assume I can just do a file compare of each file and then copy it to the new directory, iterating through each folder/file? Is there a simpler way to do this?

    Read the article

  • Ant: simplest way to copy over a relative list of files

    - by Derek Illchuk
    Using Ant, I want to copy a list of files from one project to another, where each project has the same directory structure. Is there a way to get the following to work? <project name="WordSlug" default="pull" basedir="."> <description> WordSlug: pull needed files </description> <property name="prontiso_home" location="../../prontiso/trunk"/> <!-- I know this doesn't work, what's the missing piece? --> <target name="pull" description="Pull needed files"> <copy todir="." overwrite="true"> <resources> <file file="${prontiso_home}/application/views/scripts/error/error.phtml"/> <file file="${prontiso_home}/application/controllers/CacheController.php"/> <!-- etc. --> </resources> </copy> </target> </project> Success is deriving the paths automatically: ${prontiso_home}/application/views/scripts/error/error.phtml copied to ./application/views/scripts/error/error.phtml ${prontiso_home}/application/controllers/CacheController.php copied to ./application/controllers/CacheController.php Thanks!

    Read the article

  • Copy subset of xml input using xslt

    - by mdfaraz
    I need an XSLT file to transform input xml to another with a subset of nodes in the input xml. For ex, if input has 10 nodes, I need to create output with about 5 nodes Input <Department diffgr:id="Department1" msdata:rowOrder="0"> <Department>10</Department> <DepartmentDescription>BABY PRODUCTS</DepartmentDescription> <DepartmentSeq>7</DepartmentSeq> <InsertDateTime>2011-09-29T13:19:28.817-05:00</InsertDateTime> </Department> Output: <Department diffgr:id="Department1" msdata:rowOrder="0"> <Department>10</Department> <DepartmentDescription>BABY PRODUCTS</DepartmentDescription> </Department> I found one way to suppress nodes that we dont need XSLT: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output omit-xml-declaration="yes"/> <xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates select="node()|@*"/> </xsl:copy> </xsl:template> <xsl:template match="Department/DepartmentSeq"/> <xsl:template match="Department/InsertDateTime"/> </xsl:stylesheet> I need an xslt that helps me select the nodes I need and not "copy all and filter out what I dont need", since i may have to change my xslt whenever input schema adds more nodes.

    Read the article

  • Copy from Mac OS X does not copy to iPhone Simulator

    - by PARTH
    Hi Guys, In my iPhone app, I have many ASCII arts which I need to insert into the database. I am using the simulator and pasting the textpic in the textview to insert the ASCII art to database. Here the clipboard of simulator once pastes the art properly but when I copy another art then too it pastes the previous art into textview. How to solve this problem? Is there a work around for this or any better approach? Please Help and Suggest Thanks

    Read the article

  • Write-access for c# app in it's own exe dir in Windows 7

    - by fritz
    I know that user accounts in Windows 7 are limited by default, so a program cannot just write anywhere on the system (as it was possible in Win XP). But I thought that it would be possible that e.g. a c# app is allowed to write inside it's own exe-directory or it's subfolders at least (not everything is 'user settings' or should be written to "MyDocuments"...). So currently my c# app throws an UnauthorizedAccessException when trying to write inside the exe dir. Is there anything you can do in c# code to allow writing inside the exe dir?

    Read the article

  • Copy contents of a folder, but none of its subfolders?

    - by wizlog
    I'm using the explorer bar (the bar to the left of the main folder/files section in an explorer window) to show folders. I don't have access to open any of the folders, themselves (at least none on C:\ (the C drive). For some reason, I do however have copy rights (I can copy the folders). Because I can only see the folders, is there a way for me to copy the main folder, but not any of the subfolders? A localized example could be how to copy all files in C:\documents...[user]\my documetns\ but none of the folders (ex. C:\documents...[user]\my documetns\my pictures...) Is there a way for me only to copy a folder, but not its subfolders?

    Read the article

  • PowerShell dataGridView - Copy only one Row into an other dataGridView

    - by Marcel L.
    I´ve got a very short question about the "dataGridView". I´m developing with the Microsoft PowerShell and I want to copy one Row (from $dataGridView1) to the other ($dataGridView2). With this Code I can only Copy the Value of the last focused Cell. I´ve tried to make this for a whole Row, but it´s only working with Cells. Here is my Code: **$btnListeAdd.Add_Click({ $Row = $dataGridView1.Rows[ $dataGridView1.CurrentCell.RowIndex ] $dataGridView2.Rows.Add( $dataGridView1.CurrentCell.Value ) $dataGridView1.Rows.Remove( $Row ) }) $tabListe.Controls.Add($btnListeAdd)** Only the market Cell in $dataGridView1 (similar Column 1 or 2) will be cloned in Column1 in $dataGridView2 - in a extra Row, yey. Thanks for helping me. Please show mercy. It´s my first day with the PowerShell. Kind regards, Marcel L.

    Read the article

  • Android app copy protection and data files

    - by Ben Mc
    I'm going to rephrase this question. As it turns out the original answer wasn't definitive and problems were found. ======================================================================= In my app, I access my sqlite database at the following hard-coded location in my code: /data/data/com.mydomain.appname/databases/database.db If I turn ON copy protection in the Market Place, will my app still have access to this location? Or will I have to change it to something like: */data-private/*data/com.mydomain.appname/databases/database.db (or something like this) Since I have a Dev phone only, I have no way of testing to see if my app still functions normally after turning on copy protection. Thank you!

    Read the article

  • GNU make copy files to distro directory

    - by TheRoadrunner
    I keep my source html (and images etc.) in separate directories for source control. Part of making the distro is to have make copy files to output folder and set the attributes. Today my makefile shows (extract): %.html: /usr/bin/install -c -p -m 644 $< $@ www: $(HTMLDST)/firmware.html $(HTMLDST)/firmware_status.html $(HTMLDST)/index.html $(HTMLDST)/firmware.html: $(HTMLSRC)/firmware.html $(HTMLDST)/firmware_status.html: $(HTMLSRC)/firmware_status.html $(HTMLDST)/index.html: $(HTMLSRC)/index.html This is shown with only three html files, but in reality, there are lots. I would like to just list the filenames (without paths) and have make do the comparison between source and destination and copy the files that have been updated. Thank you in advance Søren

    Read the article

  • how to copy a dictionary in python 3.1 and edit ONLY the copy

    - by MadSc13ntist
    can someone please explain this to me??? this doesn't make any sense to me.... I copy a dictionary into another and edit the second and both are changed???? ActivePython 3.1.0.1 (ActiveState Software Inc.) based on Python 3.1 (r31:73572, Jun 28 2009, 19:55:39) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. dict1 = {"key1":"value1", "key2":"value2"} dict2 = dict1 dict2 {'key2': 'value2', 'key1': 'value1'} dict2["key2"] = "WHY?!?!?!!?!?!?!" dict1 {'key2': 'WHY?!?!?!!?!?!?!', 'key1': 'value1'}

    Read the article

  • Vbscript - Compare and copy files from folder if newer than destination files

    - by Kenny Bones
    Hi, I'm trying to design this script that's supposed to be used as a part of a logon script for alot of users. And this script is basically supposed to take a source folder and destination folder as basically just make sure that the destination folder has the exact same content as the source folder. But only copy if the datemodified stamp of the source file is newer than the destination file. I have been thinking out this basic pseudo code, just trying to make sure this is valid and solid basically. Dim strSourceFolder, strDestFolder strSourceFolder = "C:\Users\User\SourceFolder\" strDestFolder = "C:\Users\User\DestFolder\" For each file in StrSourceFolder ReplaceIfNewer (file, strDestFolder) Next Sub ReplaceIfNewer (SourceFile, DestFolder) Dim DateModifiedSourceFile, DateModifiedDestFile DateModifiedSourceFile = SourceFile.DateModified() DateModifiedDestFile = DestFolder & "\" & SourceFile.DateModified() If DateModifiedSourceFile < DateModifiedDestFile Copy SourceFile to SourceFolder End if End Sub Would this work? I'm not quite sure how it can be done, but I could probably spend all day figuring it out. But the people here are generally so amazingly smart that with your help it would take alot less time :)

    Read the article

  • Write STDOUT & STDERR to a logfile, also write STDERR to screen

    - by Stefan Lasiewski
    I would like to run several commands, and capture all output to a logfile. I also want to print any errors to the screen (or optionally mail the output to someone). Here's an example. The following command will run three commands, and will write all output (STDOUT and STDERR) into a single logfile. { command1 && command2 && command3 ; } > logfile.log 2>&1 Here is what I want to do with the output of these commands: STDERR and STDOUT for all commands goes to a logfile, in case I need it later--- I usually won't look in here unless there are problems. Print STDERR to the screen (or optionally, pipe to /bin/mail), so that any error stands out and doesn't get ignored. It would be nice if the return codes were still usable, so that I could do some error handling. Maybe I want to send email if there was an error, like this: { command1 && command2 && command3 ; } logfile.log 2&1 || mailx -s "There was an error" [email protected] The problem I run into is that STDERR loses context during I/O redirection. A '2&1' will convert STDERR into STDOUT, and therefore I cannot view errors if I do 2 error.log Here are a couple juicier examples. Let's pretend that I am running some familiar build commands, but I don't want the entire build to stop just because of one error so I use the '--keep-going' flag. { ./configure && make --keep-going && make install ; } > build.log 2>&1 Or, here's a simple (And perhaps sloppy) build and deploy script, which will keep going in the event of an error. { ./configure && make --keep-going && make install && rsync -av --keep-going /foo devhost:/foo} > build-and-deploy.log 2>&1 I think what I want involves some sort of Bash I/O Redirection, but I can't figure this out.

    Read the article

  • XCode - Copy sqlite DB from simulator and copy onto device for testing

    - by Neal L
    Hello, I am working on a Core Data app, and have populated the sqlite file in the iPhone Simulator with all of the fixtures/data that I use to test the app. I would like to use that sqlite file as a standardized set of testing data. The devices that I test the app on all have different data sets, and I would like to standardize on the one in the simulator. Is there a way in XCode (3 or 4) to add a step to the build/install process that will copy the sqlite file from the iPhone Simulator and install it over the file on the phone (if one exists)? Thanks, Neal

    Read the article

  • Using jQuery copy plugin from CSS Tricks

    - by ftntravis
    I'm trying to use this plugin that CSS Tricks suggests. http://css-tricks.com/snippets/jquery/duplicate-plugin/ Shouldn't the following allow me to click a button and create a copy? $.fn.duplicate = function(count, cloneEvents) { var tmp = []; for ( var i = 0; i < count; i++ ) { $.merge( tmp, this.clone( cloneEvents ).get() ); } return this.pushStack( tmp ); }; $('.copy').click(function() { $('#form li').duplicate(5).appendTo('#form'); }; It's not working when I click it :(

    Read the article

  • Init var without copy constructor

    - by Ockonal
    Hello, I have some class(Window) without copy constructor (it's private). I can't understand how to init var of this class in my own class: class MyClass { Window obj; // Hasn't copy constructor public: void init() { obj = Window(/* constructor params */); // [error] obj(/* constructor params */); // [error] } } Error 1: initializing argument 1 of ‘Window::Window(WindowHandle, const sf::WindowSettings&)’ Error 2: ‘NonCopyable& NonCopyable::operator=(const NonCopyable&)’ is private But it works in this way: Window obj(/* constructor params */);

    Read the article

  • Need to copy remotely hosted file vis Shell Command

    - by pnm123
    Hello, There is a file that hosted remotely on a server that is not supporting Shell Access. I bought a new server that supports Shell Access so now I want to copy a file that is on the non-supporting server to new server via a Shell Command using Putty. File url is like this http://www.domain.com/file.gzip and it is username/password protected. If I be more specified, I want to copy a backup of a home directory from cPanel to my new server via Shell command. I have done this few months ago but I don't remember it now and also I failed to google it. Thank you, Prasad

    Read the article

  • Bypassing Windows Copy design

    - by Scott S
    I have been trying to figure out a way to streamline copying files from one drive (network or external in my case) to my main system drives. Short of creating a program that I will have to activate each time then choosing all the info in it, I have no really good design to bypass it. I have been wondering if there was a way to intercept a straight-forward windows copy with a program to do it my way. The basic design would be that upon grabbing the copy (actually for this to be efficient, a group of different copies), the program would organize all the separate copies into a single stream of copies. I've been wanting to do this as recently I have been needing to make backups of a lot of data and move it a lot as all my drives seem to be failing the past few months.

    Read the article

  • How do I copy an object in Java?

    - by Veera
    Consider the below code: DummyBean dum = new DummyBean(); dum.setDummy("foo"); System.out.println(dum.getDummy()); // prints 'foo' DummyBean dumtwo = dum; System.out.println(dumtwo.getDummy()); // prints 'foo' dum.setDummy("bar"); System.out.println(dumtwo.getDummy()); // prints 'bar' but it should print 'foo' So, I want to copy the 'dum' to dumtwo' and I want to change 'dum' without affecting the 'dumtwo'. But the above code is not doing that. When I change something in 'dum', the same change is happening in 'dumtwo' also. I guess, when I say dumtwo = dum, Java copies the reference only. So, is there any way to create a fresh copy of 'dum' and assign it to 'dumtwo' ?

    Read the article

  • Copy a function in memory and execute it

    - by Elinghton
    Hi everybody, I would like to know how in C in can copy the content of a function into memroy and the execute it? I'm trying to do something like this: typedef void(*FUN)(int *); char * myNewFunc; char *allocExecutablePages (int pages) { template = (char *) valloc (getpagesize () * pages); if (mprotect (template, getpagesize (), PROT_READ|PROT_EXEC|PROT_WRITE) == -1) { perror ("mprotect"); } } void f1 (int *v) { *v = 10; } // allocate enough spcae but how much ?? myNewFunc = allocExecutablePages(...) /* Copy f1 somewere else * (how? assume that i know the size of f1 having done a (nm -S foo.o)) */ ((FUN)template)(&val); printf("%i",val); Thanks for your answers

    Read the article

  • Copy file from server share to local folder with Applescript

    - by user345150
    Hello. I have a folder on a server which is shared with guest access enabled. I want to be able to copy a file from that folder to a local machine with Applescript. So far I have: property source : "server:sharedfolder:file.ext" property destination : "Macintosh HD:Users:User:Documents:Folder" tell application "Finder" copy file "source" to folder "destination" end tell Which I think should work. But I get the error :Can't set folder source to destination number 10006. Any ideas? Thanks.

    Read the article

  • Need to copy remotely hosted file via Shell Command

    - by pnm123
    There is a file that hosted remotely on a server that is not supporting Shell Access. I bought a new server that supports Shell Access so now I want to copy a file that is on the non-supporting server to new server via a Shell Command using Putty. File url is like this http://www.domain.com/file.gzip and it is username/password protected. To be more specific, I want to copy a backup of a home directory from cPanel to my new server via Shell command. I have done this few months ago but I don't remember it now and also I failed to Google it.

    Read the article

  • ctrl-c does not copy text on a webpage

    - by aepheus
    I've come across this several times, ctrl-c randomly does not copy. I think it's caused by javascript or maybe some odd html syntax. I never spent the time to track down what caused it. Anyone know the typical/common causes of ctrl-c not working (to copy) on a website? Speaking from a developers standpoint. What do we developers end up doing to break ctrl-c? Just to clarify, I'm not interested in preventing copying. I'm trying to do the opposite, occasionally I find I've done something that is preventing ctrl-c from copying text, and that is not very user friendly on a text heavy site.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >