rename

SubGit error when svn users commit

ぐ巨炮叔叔 提交于 2019-12-11 20:35:57
问题 I just installed SubGit and test it. When one of svn user commited a file, he got the following error message: Commit failed (details follow): 'pre-commit' hook failed with error output: SubGit ERROR REPORT (SubGit version 1.0.2 ('Miai') build #1764): You've received this message because SubGit (http://subgit.com/) is installed in your repository and an error that needs to be dealt with has occured in SubGit translation engine. UNRECOVERABLE ERROR: svn: Cannot rename file 'F:\svn\testsubgit

renaming command into different namespace

时间秒杀一切 提交于 2019-12-11 19:42:49
问题 To enhance the functionality of a tcl/tk program, I'd like to re-implement one of it's original (namespaced) functions. The new implementation should call the original implementation for the core functionality, and add some nifty stuff around. This is documented quite well using tcl's rename command. To keep things as modular as possible, I would like to put my new functionality into a separate namespace. I would also like to avoid adding things to the original namespace of the toobe-enhanced

Rename a file in C# (NET 2.0) without moving it or using DOS / Visual Basic commands

无人久伴 提交于 2019-12-11 19:34:18
问题 I have not found yet a file-rename-function in .NET for C#, so I'm a bit confused how I would rename a file. I use the command prompt with Process.Start, but this isn't really professional and a black DOS window is popping up each time. Yes, I know there is something in the Visual Basic namespace, but this is not my intention to add the "visual-basic.dll" to my project. I found some examples which "move" the file to rename it. It is a quite painful method and a shoddy workaround for things.

addFilter Rename ZendFramework

耗尽温柔 提交于 2019-12-11 16:47:13
问题 i need to Rename a file with Zend_File_Transfer() only if new file match with old one in the server using some convention like newfile-1.ext where the -1 is the string that is added but Rename filter is strange, i really dont understand so good. For example, is necesary some like this: if(file_exists($file)){ $upload->addFilter('Rename', $file); } or Rename does it? thanks 回答1: Here is an example from one of my apps. File is recvieved by an Zend_Form $upload->receive(); $name = $upload-

Add prefix to filenames using batch files [duplicate]

心已入冬 提交于 2019-12-11 15:59:48
问题 This question already has an answer here : At which point does `for` or `for /R` enumerate the directory (tree)? (1 answer) Closed 5 months ago . I can add a prefix to a series of text files using: :: rename files for %%a in (*.txt) do ( ren "%%a" "Seekret file %%a" :: ECHO %%a Seekret file %%a ) which will turn a.txt b.txt c.txt into Seekret file a.txt Seekret file b.txt Seekret file c.txt However, the above code seems to rename the first file twice with the prefix. I end up with Seekret

Rename file by swaping text

亡梦爱人 提交于 2019-12-11 15:32:19
问题 I need to rename files by swaping some text. I had for example : CATEGORIE_2017.pdf CLASSEMENT_2016.pdf CATEGORIE_2018.pdf PROPRETE_2015.pdf ... and I want them 2017_CATEGORIE.pdf 2016_CLASSEMENT.pdf 2018_CATEGORIE.pdf 2015_PROPRETE.pdf I came up with this bash version : ls *.pdf | while read i do new_name=$(echo $i |sed -e 's/\(.*\)_\(.*\)\.pdf/\2_\1\.pdf/') mv $i $new_name echo "---" done It is efficient but seems quite clumsy to me. Does anyone have a smarter solution, for example with

extract values/renaming filename in python [closed]

随声附和 提交于 2019-12-11 14:51:33
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I am trying to use python to rename a filename which contains values such as: ~test1~test2~filename.csv I want to rename the file to filename.csv. The tildes being my separator for the first two words, and I do

How to rename the folders and subfolders including the files present in it recursively using Java NIO Files?

浪尽此生 提交于 2019-12-11 14:43:27
问题 I cant able to rename the folder which contains a files or sub folders in it. My Folder structure is D: root popcorn-folder1 popcorn-subfolder1 popcorn-subfile1 popcorn-file1 popcorn-folder2 popcorn-subfolder2 popcorn-file2 My resulting Directory should be D: root folder1 subfolder1 subfile1 file1 folder2 subfolder2 file2 My tried code is package com.din.pach; import java.io.File; import java.io.IOException; import java.nio.file.FileVisitResult; import java.nio.file.FileVisitor; import java

Check if USB device is idling, LINUX

别说谁变了你拦得住时间么 提交于 2019-12-11 13:23:44
问题 I've got a quick question, but I can't find an answer. Is it possible in linux (or in python) to see if an external usb pen drive is idling? I need to know this for a python script I'm writing. I need to rename a folder on an external usb pen drive as soon as nothing is writing to it. edit: I know there is lsof command to list open files. 'lsof /theDir' only works half. It works OK when the process copying to the USB is still running. But when the process stops, lsof shows nothing. But the OS

Change a column name in rails database.

眉间皱痕 提交于 2019-12-11 12:45:42
问题 I'm having this table class CreateEvents < ActiveRecord::Migration def self.up create_table :events do |t| t.integer :subcategory t.string :event_name t.text :description t.string :location t.date :date t.decimal :price t.timestamps end end def self.down drop_table :events end end and i want to change the subcategory to subcategory_id. I tries this one but is not working ruby script/generate migration RenameDatabaseColumn and then i went to the file which is in db\migrate and edited to look