Questions tagged [file-move]

Moving files in a filesystem.

Use this instead of tags like which are really vague.

132 questions
1
vote
1 answer

Does a file operation (move, rename) change last modified field of a file?

What does "lastmodified" describe? Just the file's content or also file system related things like file name and Path? My interest goes especially for the Android platform. I will store data in my app's directory. A quick test showed, that a Samsung…
OneWorld
  • 17,512
  • 21
  • 86
  • 136
1
vote
1 answer

PHP: move with rename fails, but combination of copy and unlink works

I am trying to use PHP's rename to move a file to a different folder (and also rename the file in the same step). However, rename always returns false. On the other hand, using a combination of copy and unlink works just fine. What could be causing…
fuenfundachtzig
  • 7,952
  • 13
  • 62
  • 87
1
vote
1 answer

Most efficient way to rename an image

Is there a more efficient way to rename a file in Windows other than: System.IO.File.Move(sourceFileName, destFileName); I have millions of them and using the above will take almost a week to run.
Mitchell
  • 169
  • 1
  • 14
1
vote
1 answer

Atomic file move issue on Java 7 on Ubuntu

There are some workarounds, but I wanted to raise an issue with the real thing. I've an external server uploading files to /upload folder and I'm using java.nio.file.Files atomic move to copy them into /dest folder and then processing the moved…
1
vote
1 answer

git: view log and changes of moved file

I have file in git and want to check it's history: commits when it was changed and what exactly was changed between this commits. But: I know that I have renamed the file in the past git history May be even have moved between directories. What…
klm123
  • 12,105
  • 14
  • 57
  • 95
0
votes
1 answer

Moving files to the right folders and renaming them using a batch script

To simplify routine work I made a batch script (.bat) that gives, for example, 4 subfolders and 16 *.dds files in the current folder. These subfolders and files have ordered names like: Folder names: 002360, 002361, 002362, 002363. File names:…
0
votes
0 answers

I'm writing a code for fanotify to listen a filesystem

I'm writing a code for fanotify to listen a filesystem, but I'm having trouble writing a file move-in and move-out event, and I'd like to ask if a file is moved in a file system that's being listened to. Do their MOVED_FROM and MOVED_TO match? That…
xzq
  • 21
  • 1
0
votes
0 answers

Adding error logging and output to Powershell move script

I have been working on a short powershell script that loads a CSV and for each row of data it finds the file in the folder and moves it to a separate destination. The purpose of this is to find and move thousands of specific files out of 400k of…
BoBFiSh
  • 102
  • 9
0
votes
0 answers

Automatization of file movement with a bash script

I would like to make a simple bash script where the goal is to make it run another script and move the output files from that script to a different folder. The problem is , that this somescript.pl creates a file like…
0
votes
0 answers

Resolving error in move-item powershell command

I am trying to write a short powershell MOVE-ITEM command that takes rows of data from a CSV and moves the file from the folder it is in to a separate folder (which already exists). I've looked at various examples and I think I'm pretty close but…
BoBFiSh
  • 102
  • 9
0
votes
2 answers

Python "move a specefied number of certain files"

I am trying to move a specific number of certain files. for file_names in file_names[:12]: if os.path.isfile(file_names): if file_names.endswith('.txt'): shutil.move(os.path.join(dir_path, file_names), nf) The original…
w j
  • 43
  • 1
  • 7
0
votes
2 answers

Python folder creation, naming, and files naming issues

Originally tried this with PowerShell and it kicked my butt. So I switched to python since I know this better. There are still a few key issues in which I am having trouble. What is supposed to happen is that the program checks if there are any…
w j
  • 43
  • 1
  • 7
0
votes
0 answers

FileExistsError while using pathlib file.rename function

I'm trying to move files to a newly created folders but I'm getting "FileExistsError: [WinError 183] Cannot create a file when that file already exists": This is part of my code: #Creating year folder year_folder =…
0
votes
0 answers

Matching unique filenames to a dataframe column and then moving these files

I have a large number of files that have unique names and I need these files to be moved to a new file location based on whether they match the name in a dataframe. For example, The file names would look…
0
votes
1 answer

File relocator in C#

I want to move from the folder named Main a file and it should go to Folder 1 every 15 seconds and from Main to Folder 2 every 60 seconds. The problem is that folders 1 and 2 will conflict on 60 seconds tick. For Folder 1 it would be 4th time…
1 2 3
8 9