Questions tagged [file-copying]

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.

file-copying
Filter by
Sorted by
Tagged with
1 vote
1 answer
2k views

Read a file while some other program is writing the file in python

I am reading a file continously and another program modifies it. When i try to read the it only prints blank spaces. File that reads import os import time f=open("file.py","r",os.O_NONBLOCK)...
Yash's user avatar
  • 220
0 votes
1 answer
320 views

Changing extension, extract, delete zip, merge new folder

I have a unique file extension which is really just a zip. I am trying to in one event change the extension name, extract the files, then merge them all into one file. I can move the file, change the ...
kdotcannon's user avatar
0 votes
0 answers
163 views

copy files and directory in java

In my program I suppose to copy a directory to another directory with java. I did it but the only problem is that for the directories that are inside the source directory get copied but not the file ...
Jane B.'s user avatar
  • 21
-1 votes
2 answers
2k views

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: #...
Jaziri Rami's user avatar
0 votes
2 answers
633 views

Shell script to display the number of files which are copying from one directory to another

I want to display the number of files which are copied from one directory to other while doing "CP"command. what could be the command to add to it.
Alfred's user avatar
  • 15
0 votes
1 answer
628 views

How to access and copy Cloudian S3 files using AWS CLI

I'm new to AWS S3. I need to access a Cloudian S3 bucket and copy files within a bucket to my local directory. What I was given was 4 piece of info in the following format: • Access key: ...
angel_30's user avatar
0 votes
0 answers
53 views

Copying many large files from R to a new SQL db

I have 6,000 files on a server, each 11M rows of a single column. As I understand it there are 3 steps: Connect to a SQL DB Read in the files Write them to the SQL DB So I think I've connected to ...
Sam Koss's user avatar
  • 171
0 votes
1 answer
326 views

Moving files between folders when folder names match partially (in R or VBA)

I'm trying to solve the following problem I have 9 folders titled PROS_2010 to PROS_2019. Each of them has about 500 subfolders with names structured as follows e.g. PROS_201001211_FIRM NAME_number. ...
SJDS's user avatar
  • 1,279
0 votes
1 answer
992 views

Batch script to duplicate a file multiple times using filenames from a list

I'm Using a batchscript to duplicate a couple of PDFs and output them with different filenames each. So far, What I have done is SET Template=C:\Temp\template.pdf copy /y %Template% .\%Class%\...
Deli.Rose's user avatar
0 votes
3 answers
985 views

Copy all files in folder to another folder prepending a . to the file name and rename it back to original file name

after searching and trying various way I couldn't get it work. I need to copy lots of files (more than 100 thousand files) to another folder with dot prepended to the file name Example: /foo/bar/...
JL007's user avatar
  • 25
0 votes
2 answers
446 views

System.IO.Copy operation intermittently giving Access Denied Error in .Net 4.0 C# Console Application

I have a console application written in .Net framework 4.0 C#. In the application I am copying a file from one location of the server to another location. Here is the code: System.IO.File.Copy("...
Bibhu Prasad's user avatar
4 votes
2 answers
5k views

Copy file to Azure App Service During Release Pipeline

During the Azure Release pipeline, I would like to copy a file in a Git repo to the wwwroot directory in the app service. The output from the task says it copies the file but it is not there. I am ...
Doug's user avatar
  • 41
1 vote
2 answers
1k views

.How to copy files from project assets folder to device data folder in android studio?

I am trying to use SQLiteAssetHelper and it requires me to create database on PC and copy it to assets/databases/databasename.db. I do that, but when I check on the device, nor the database, nor the ...
KijeviGombooc's user avatar
0 votes
0 answers
207 views

Is there a way to use SaveCopyAs with the dialog, custom name and choosing the current file type (format) (52 or .xlsm)

I need code that will save a copy of the active workbook with a custom name, specifying the file type (.xlsm). I have used ActiveWorkbook.SaveCopyAs with a custom name. This will save a copy but ...
Sean's user avatar
  • 3
-1 votes
2 answers
2k views

copy and rename file in linux bash [duplicate]

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 ...
Alex Polleti's user avatar
0 votes
0 answers
44 views

Using multithreads to copy a single file at the same time, outputting the same file down to the MD5 check sum

The problem I'm running into is that when the file tries to copy, it only copies part of the file and the other part is a bunch of unreadable characters. This is for an academic assignment that wants ...
Kevin Bell's user avatar
1 vote
0 answers
152 views

Git Checkout Speed - Under the Hook

NOTE: This is not about how to use Git.. This is about under the hood working. Can you explain how Git can checkout files so quickly from one branch to another? For example, giving I have two ...
Garry Taylor's user avatar
1 vote
1 answer
1k views

Copy all files in subfolders into new folder

I've been searching the net and have found a lot of posts about copying files, but I haven't had luck with copying files in subfolders. What I want to do is give a sourcePath, and a destinationPath. ...
mightymax's user avatar
  • 431
3 votes
1 answer
2k views

Jupyter Notebooks unreadable after file move/copy operation

I now get the following error when trying to open 2 Jupyter notebooks in the notebook web file browser: This occurred after I had done a series of move and copy operations in the terminal in an ...
Bill's user avatar
  • 10.9k
-1 votes
1 answer
334 views

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 ...
AnotherOne's user avatar
0 votes
1 answer
173 views

how to get the value of last executed command in strawberry perl

I am trying to execute a simple strawberry perl script for file copy to get the code from the last executed command. But I get 0/success in all the case. Code from my test.pl script use File::Copy; ...
Priti Verma's user avatar
1 vote
1 answer
944 views

Copy Files and Folders Checking for existence

(Newer to C#) I have an application that I have built that copies files and folders from one location to another. I originally had issues with folders. For some reason, it would try to copy the file ...
user3542866's user avatar
0 votes
1 answer
2k views

SAF - Invalid URI error from DocumentsContract.createDocument method (FileOutputStream copy)

My app is migrating to SAF or, at least some experimentation is going about. Now it has to copy a file from private app folder to a SAF folder that was authorized. The used method is: static ...
P5music's user avatar
  • 3,283
0 votes
1 answer
284 views

SAF - NullPointerException when copying file from private app folder to authorized SAF folder

My app has to copy a file from private app folder to a SAF folder with the suitable permissions granted. The used code is: static boolean copyFileToTargetFolderWithNewName(Activity activity, String ...
P5music's user avatar
  • 3,283
1 vote
1 answer
1k views

SAF - Invalid Uri error when copying file from private app folder to authorized SAF folder

My Android has to copy a file from private app folder to a SAF location that was previously granted permissions and authorized. The code is: static boolean copyDocumentFileToTargetFolderWithNewName(...
P5music's user avatar
  • 3,283
0 votes
1 answer
830 views

How to copy files name/path containing spaces in unix?

My target is to search the files containing a pattern and copy it to a folder. The files may available in many folders from a folder (say /home/abc/logs/ ....). Some file names and folders carry ...
impika's user avatar
  • 107
0 votes
0 answers
111 views

Python copyfile() Permission denied

I am trying to copy a file (sourcecode below), but on my console window I got the error: "PermissionError: [Errno 13] Permission denied: 'C:\pathOfFile(Example)\Test.py'". I did it with following code:...
Maximilian Müller's user avatar
0 votes
1 answer
798 views

Java File Copy -How to Backup/copy the input file to other destination location?

Want to copy/backup the file to destination folder before performing any task. (jdk -1.7) /*Input file path taken from properties file as string is :inputFile where-in inputFile is :C:\\...
meenu's user avatar
  • 3
0 votes
1 answer
399 views

Why does FileInfo Length not match the TotalFileSize passed to progress of CopyFileEx

I am writing a backup utility. It is my first c# forms application. For most files FileInfo length() matches the TotalFileSize passed to the CopyFileEx progress handler. However, for just one file ...
user358795's user avatar
0 votes
2 answers
228 views

VB.net Check items in a text doc and see if it's in a folder

I have a text document with a list of file names and their extensions. I need to go through this list and check a directory for the existence of each file. I then need to output the result to either ...
mightymax's user avatar
  • 431
0 votes
0 answers
172 views

Copy Files and Folders recursively with Powershell

In a vbscript, I have some code to copy files and folders recursively using a powershell command: pCommand = "Copy-Item " & sourcePath & " " & destinationPath & " -Recurse -Force" ...
Mu21's user avatar
  • 27
2 votes
3 answers
1k views

Copy specific files from subdirectories into one directory

I have a directory: ❯ find ./images -name *150x150.jpg ./images/2060511653921052666.images/thumb-150x150.jpg ./images/1777759401031970571.images/thumb-150x150.jpg ./images/1901716489977597520.images/...
gib's user avatar
  • 748
0 votes
3 answers
135 views

How to convert the : char into a newline in a file by python

I am having a text file in which data is in this form: Before formatting: a1 ,a2,a3:b1 ,b2,b3:c1 ,c2,c3:....so on. Now i want to convert the data in this particular form: After formatting: a1,...
54TY4M's user avatar
  • 61
-1 votes
1 answer
262 views

Read a file in bash and for each line perfome copy and maintain sequence [duplicate]

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 ...
techwelll's user avatar
1 vote
0 answers
143 views

why same locale but one has error <java.nio.file.InvalidPathException: Malformed input or input contains unmappable chacraters?

I have the same source to run STAG and PROD, when copy a file with Japanese name, STAG got error and PROD is no, why? <java.nio.file.InvalidPathException: Malformed input or input contains ...
mikezang's user avatar
  • 2,383
3 votes
1 answer
5k views

How can I copy a file from the isolated storage to the Downloads folder?

I'm trying to copy my database file from the isolated storage to the Download folder (or any folder that the user can access). Currently my database is stored in: /data/user/0/com.companyname....
Nicke Manarin's user avatar
0 votes
1 answer
320 views

CopyFile cant found the file while i can open it from fopen

I try to create a program that creates a backup of a folder. The problem is that when I try to use CopyFile function I get error 2 (FILE_NOT_FOUND) but I can open the file using the fopen and the ...
Nikos Issaris's user avatar
0 votes
0 answers
546 views

Copying files from /usr/local/lib into /usr/local/lib/python2.7/site-packages in Raspbian-stretch

I have some files in /usr/local/lib and I need to copy them in this folder /usr/local/lib/python2.7/site-packages. These files are not copied in this folder correctly due to permission issues. I ...
Mafaz Ahsan's user avatar
0 votes
0 answers
93 views

Check for, copy, and update files

Not sure if I'm missing stuff when copying files. Think code works. I'm looking for input on what I might not be thinking about. if (File.Exists(docmain1) == true && File.Exists(...
Max Effects's user avatar
0 votes
1 answer
1k views

Copying files task as a specific user Azure DevOps

I'm trying to copy a directory from a folder to a destination (the destination is a shared folder on the network). How may I perform this action with the credential of a specific user? (I've tried ...
gsmida's user avatar
  • 357
0 votes
1 answer
1k views

oozie fs action. copy command

I need to copy a directory from one hdfs-path to another one. However, I run into the absence of copy command in Oozie framework: <action name="SOME_ACTION"> <fs> <copy ...
Loom's user avatar
  • 9,918
0 votes
1 answer
1k views

How to Copy a complete XML-file in laravel from public to storage folder

In my Laravel project I would like to copy a .xml file named config.xml from the public/xml folder to the storage/Admin/webapp folder.(The storage is symlinked) It seems like I can´t get it to work. I ...
Misuke Ichiru's user avatar
2 votes
2 answers
8k views

Errno 22 Invalid Argument Python

I'm trying to copy one file's content to another, and error appears, what do i do wrong? for file in os.listdir('offer'): if '.css' in file: print(file) with open(f'offer/{file}', ...
Razeel's user avatar
  • 47
0 votes
0 answers
49 views

Why does this command sometimes throw array bounds exceptions when it contains no arrays

I have a process that loops through an array which is a list of PDF filenames, for each file it must write a template PDF which is stored in the same folder as the exe and copy this to a network share ...
Colster's user avatar
  • 79
0 votes
2 answers
709 views

How to copy files in Bash that have more than 1 line

I am trying to copy files from one directory (defined as $inDir below) to another (defined as $outDir below) if they 1) exist and 2) have more than 1 line in the file (this is to avoid copying files ...
user5481267's user avatar
-4 votes
1 answer
52 views

How to Move the files from one directory to another directory?

Directory file name should append with current date (yyyy-mm-dd) import shutil import os source = '/path/to/source_folder' dest1 = '/path/to/dest_folder' files = os.listdir(source) for f in files: ...
Harishkumar's user avatar
0 votes
1 answer
7k views

Azure Pipeline copy files from multiple source folder into single destination

I am working on Azure DevOps build pipeline. I have a Server.sln which has student 2 C# projects like Error.csproj and Log.csproj. My folder structure is like below Code (folder) Error (folder) ...
Ziggler's user avatar
  • 3,433
0 votes
1 answer
1k views

Error while trying to copy the file from one folder to a temp folder in JAVA [Access Denied]?

I am trying to copy a bunch of files from one folder to a temp folder using java but its giving me File not found error(Access Denied) The code snippet is: ` // defining path Path ...
Akash Anand's user avatar
0 votes
2 answers
3k views

how to copy multiple files from one directory to another with progressBar in c# window form

I'm going to copy multiple files from one directory to another but the problem i face is that "my code copy only one file from one directory to another" . actually i'm going to make the clone of File ...
Arsalan sajjad touqeer's user avatar
1 vote
0 answers
38 views

Path not found after copieng files

A list and a target path are passed to a procedure. The list contains the source paths of the files to be copied. The For loop runs over the list and passes the source path together with the target ...
Obi8's user avatar
  • 13

1 2 3
4
5
15