The filesystem operation whereby the contents of a disk file are duplicated exactly and stored in a different location. Questions concerning non-filesystem methods (e.g. using stdin and stdout) of file duplication are also acceptable.
Questions tagged [file-copying]
735 questions
-1
votes
1 answer
How do I copy a file without overwriting an existing file in Go?
How to create a new file with the given name if the file exists
eg : if word_destination.txt exists copy content to word_destination(1).txt
Any help would be appreciated...
package main
import (
"fmt"
"io/ioutil"
"os"
)
func main()…

meena sushanth
- 51
- 8
-1
votes
2 answers
How to copy files in Python without `os.rename` or `shutil`?
I have some photos and some videos that I have to copy them in another folder without using shutil and os.rename. I can’t use shutil and os.rename because this is a condition for that Python exercise. I tried open but it only worked for text and…

M.HBA
- 51
- 6
-1
votes
1 answer
How to configure multiple remote session using Jsch
In my application I have 2 requirements with 2 different remote server:
I have to copy a file from localhost to Remote Server X
copy a different file from Remote Server Y to localhost
I am aware that Jsch can be used like below:
JSch jsch = new…

Manish
- 1,274
- 3
- 22
- 59
-1
votes
1 answer
VBScript file copy FileExists return false mounted drive drive
I am under the context of a script executed within an installation package MSI created with InstallShield. I execute the below script:
Set wshShell = CreateObject( "WScript.Shell" )
User = wshShell.ExpandEnvironmentStrings( "%USERNAME%" )
MsgBox…

Salim
- 495
- 3
- 20
-1
votes
1 answer
Guys i am getting error as below while copying the file from puppet master to agents
1.when i used "puppet agent -t" command in agents it's not retrieving from puppet server and getting the error as below.
2.the below code i have used in modules path:/etc/puppetlabs/code/environments/production/modules/mailx/manifests/init.pp and i …

chennareddy
- 11
- 1
-1
votes
2 answers
Arrange file based on month information on filename
I have a folder contain daily rainfall data in geotiff format from 1981-2019 with naming convention chirps-v2.0.yyyymmdd.1days.tif
I would like to arrange all the files based on MONTH information, and move into a new folder, ie all files with Month…

user97103
- 235
- 1
- 7
-1
votes
1 answer
Can we copy files with incremental checksum computation?
I know using rsync -c we can copy files and having them verified with checksum. The issue is that rsync first build a list of files and at the same time it computes the checksum for all files. This would take forever if you have millions of files.…

Farshid
- 400
- 1
- 4
- 11
-1
votes
2 answers
CopyFile from one directory to another (C++)
i'm working on Windows and i'm trying to simply move a file from one directory to another.
I use the method "CopyFile" but i have an issue whith the name of the file copied; i'm trying this:
#include
#include
std::string…

Jaziri Rami
- 147
- 1
- 12
-1
votes
2 answers
copy and rename file in linux bash
I'd like to copy and rename multiple files within the same folder. Just like I have the files
foo.c foo.h and want to use them as a template for new files named bar.c bar.h.
cp foo.* bar.*
would describe what I mean but won't work.
using rename…

Alex Polleti
- 11
- 7
-1
votes
1 answer
Win32 CopyFile can't copy to external drive
I'm creating a windows service that copies a file to an external thumb drive using CopyFileW.
Everything works as expected, but the problem is that windows copies the file to thumb drive and it shows as a 'File' type and can be neither deleted,…

AnotherOne
- 854
- 2
- 8
- 19
-1
votes
1 answer
Read a file in bash and for each line perfome copy and maintain sequence
I have txt file contains names of jar , I want to read this txt file and for each line I want to find and move jar with same name and version number appended (version number is subject to change) from a folder X to folder JarSequence.
Text file is…

techwelll
- 33
- 3
-1
votes
1 answer
I can not make a copy of all the files inside a folder with C ++
I wanted to write a program in C++ where it copied all the files in a folder and pasted them into another folder. For now, I managed only with a single file.
#include
#include
using namespace std;
int main (int argc, char…

Giacomo
- 1
-1
votes
1 answer
Copy only data needed from one big file to another
I'm making a project from my finals on cafe, in which I need user to select drinks from a made file drinks which has drinks in list like:
1. Coca-Cola $5
2. Pepsi $8
now I want user to press 1 if he or she wants to buy coca-cola and then the 1.…

Zero001
- 31
- 9
-1
votes
1 answer
Java copy files into zip with Files
How do I copy a file from D:\test\ folder to D:\test.zip using java.nio.files.Files? I got NoSuchFileException: D:\Ausbildungsnachweise\Ausbildungsnachweis_Technisch_Form.doc -> D:\test.zip\Ausbildungsnachweis_Technisch_Form.doc as exception. I…

XtremeBaumer
- 6,275
- 3
- 19
- 65
-1
votes
1 answer
How to Save files to system files on Android
I want to save file to files system on Android to this path "/efs/wifi/"
I created My file by FileWriter writer =new FileWriter (file,true) i want save this file to path above
For root devices
Another thing how can i copy from sd card to same…

Moataz Alking
- 1
- 1