Questions tagged [overwrite]

Overwriting is a process of replacing content with other content in place. It can be physically replaced on storage, or overridden with newer version of content type.

Overwriting is a process of replacing content with other content in place. It can be physically replaced on storage, or overridden with newer version of content type.
Not to be confused with Override in Object Oriented Programming.

1342 questions
15
votes
2 answers

Have you ever got this message when moving a file? mv: will not overwrite just-created

I have a bourne shell script which performs several tasks. One of these tasks is to move some files to certain directory. Today, when I ran the script I got the following message: mv: will not overwrite just-created with…
Nacho Mezzadra
  • 724
  • 2
  • 9
  • 13
14
votes
1 answer

How to force NLog to overwrite the log file

I need NLog to overwrite the log file when the application is restarted. Currently it appends to existing file. For example I have something like this in my NLog.config
Vadim
  • 19,585
  • 14
  • 61
  • 100
13
votes
2 answers

Visual Studio Permanently Disable Overwrite

I have a minor annoyance with Visual Studio. In the bottom right hand corner of Visual Studio, there is a INS/OVR button to toggle Insert/Overwrite. I always have this button set to INS, and I always want it to be set to INS. However, sometimes when…
Elaine Lin
  • 371
  • 1
  • 2
  • 15
12
votes
2 answers

python overwrite previous line

how do you overwrite the previous print in python 2.7? I am making a simple program to calculate pi. here is the code: o = 0 hpi = 1.0 i = 1 print "pi calculator" acc= int(raw_input("enter accuracy:")) if(acc>999999): print "WARNING: this…
Cinder
  • 1,419
  • 2
  • 13
  • 23
12
votes
6 answers

How do I Insert or Update (or overwrite) a record using NHibernate?

I need to write a row to the database regardless of whether it already exists or not. Before using NHibernate this was done with a stored procedure. The procedure would attempt an update and if no rows were modified it would fallback to an insert.…
g .
  • 7,722
  • 5
  • 34
  • 48
11
votes
2 answers

Overwrite existing read-only files when using Python's tarfile

I'm attempting to use Python's tarfile module to extract a tar.gz archive. I'd like the extraction to overwrite any target files it they already exist - this is tarfile's normal behaviour. However, I'm hitting a snitch in that some of the files have…
victorhooi
  • 14,225
  • 20
  • 79
  • 112
11
votes
5 answers

Overwriting previously extracted files instead of creating new ones

There are a few libraries used to extract archive files through Python, such as gzip, zipfile library, rarfile, tarfile, patool etc. I found one of the libraries (patool) to be especially useful due to its cross-format feature in the sense that it…
multigoodverse
  • 5,876
  • 11
  • 51
  • 93
11
votes
2 answers

R: Avoid accidently overwriting variables

Is there any way to define a variable in R in your namespace, such that it can't be overwritten (maybe ala a "Final" declaration)? Something like the following psuedocode: > xvar <- 10 > xvar [1] 10 xvar <- 6 > "Error, cannot overwrite this…
bigO6377
  • 1,094
  • 1
  • 11
  • 25
11
votes
5 answers

How to copy certain files (w/o folder hierarchy), but do not overwrite existing files?

I need to copy all *.doc files (but not folders whose names match *.doc) from a network folder \\server\source (including files in all nested folders) to a local folder C:\destination without preserving the nested folders hierarchy (i.e. all files…
Vladimir Reshetnikov
  • 10,671
  • 4
  • 27
  • 46
10
votes
4 answers

Insert Where Not Exists-Without Primary Key

I have 3 tables: dentists, groups, and groupdentlink. Many dentists link to many groups through the groupdentlink table. So I'm trying to make a query where it will insert rows into groupdentlink (linking all dentists in the state with all the…
Brian Barrus
  • 375
  • 3
  • 6
  • 16
10
votes
2 answers

Maven overwrite resource file in dependency

I have two Maven modules, A and B. A is a dependency of B. Both modules have a resource file named default.properties located in src/main/resources. I need to keep the filenames the same and the location of the file the same in both projects because…
user1040535
  • 183
  • 1
  • 11
10
votes
2 answers

How to extend django admin view?

i want to display additional sidebar in my django admin index. I have created templates/admin/index.html and it show up. Now i need some data from model. To do this I have created index function in the file admin/views.py def index(request): …
kierzniak
  • 586
  • 4
  • 14
10
votes
1 answer

Windows: Overwrite File In Use

I am trying to write a utility that will allow moving files in Windows, and when it finds a file in use, will set that file to be moved on reboot. It seems that MoveFileEx (http://msdn.microsoft.com/en-us/library/aa365240(VS.85).aspx) is the right…
singpolyma
  • 10,519
  • 3
  • 42
  • 69
10
votes
1 answer

How to overwrite files in VS Code on copy-paste (and not get a *.1* appended to the filename)?

Whenever I copy-paste a file in VS Code's project pane from one folder to another with an existing file of the same name, it keeps appending a .1 in the filename. (ex: bob.jpg -> bob.1.jpg). Is there a way to disable this and have it overwrite the…
bigp
  • 3,913
  • 3
  • 27
  • 52
10
votes
2 answers

Delete the contents of a file before writing to it (in Python)?

I'm trying my hand at this rosalind problem and am running into an issue. I believe everything in my code is correct but it obviously isn't as it's not running as intended. i want to delete the contents of the file and then write some text to that…
Tare Gaskin
  • 831
  • 2
  • 7
  • 13
1 2
3
89 90