FAQ Database Discussion Community


How can I tell PHPStorm to find references to rewritten URLS?

reference,phpstorm,file-rename
I wanted to rename one of my files, mypage.php into myprofile.php, but PHPStorm does not find any file references. In the code, mypage.php is referenced without the file extension. For example: <a href='../user/mypage/'> So it has to look for mypage, not mypage.php and rename it myprofile, without file extension. How...

rename all the image files in a specified directory

php,file-rename
i am trying to create couple of lines of code which will rename all the jpg images in a specified directory.The parent directory was c:/xampp/htdocs/practice/haha/.But renamed images are saved in c:/xampp/htdocs/practice/ My code do rename the file ,but problem is it deletes all the image file form the specied directory...

How to remove prefixes into files using the Windows command line

windows,command-line,file-rename,batch-rename
My files are x_name.png, x_something.png, x_somethingElse.png How can I remove the "x_" prefix from all these files ?...

Rename multiple files with different extensions on linux

linux,file-rename
I have a bunch of files with different extensions and i would like to add a suffix at the end of all of their names: Fe2-K-D4.rac Fe2-K-D4.plo Fe2-K-D4_iso.xy ... to Fe2-K-D4-4cc8.rac Fe2-K-D4-4cc8.plo Fe2-K-D4-4cc8_iso.xy ... I read a few posts about changing the extension using the rename tool but i don't...

rusty with simple bash scripts

bash,substitution,file-rename
I'm working out of very old memory here and I just can't see what's wrong with the following little snippet of a script. I isolated the problem to this part >> #!/bin/sh for x in `ls ~/sandbox/inputVids/*.mp4` do echo $x; cp "$x" "~/sandbox/outputVids/${x/%.mp4/.silent.mp1}"; done I keep getting the message ./makeRepeater.sh:...

Modification of file names

linux,file,file-rename
I have a list of more than 1000 files on the following format. 0521865417_roman_pottery_in_the_archaeological_record_2007.pdf 0521865476_power_politics_and_religion_in_timurid_iran_2007.pdf 0521865514_toward_a_theory_of_human_rights_religion_law_courts_2006.pdf 0521865522_i_was_wrong_the_meanings_of_apologies_2008.pdf I am on Linux and want to change them as follows 2007_roman_pottery_in_the_archaeological_record.pdf 2007_power_politics_and_religion_in_timurid_iran.pdf...

Warnings 5 and 32 on first two files while renaming all files in a directory

php,image,warnings,file-rename
I made a simple image renaming application. It adds a number serially after every image name to distinguish one from another. But the problem is that, when this PHP application runs I get two warnings and I think for this reason $i value is starting with 3, like image 3,...

C# Reading through CSV file to rename multiple files with new names

c#,csv,file-rename,batch-rename
I would like to use a list of old and the corresponding new names in a CSV file(source of CSV is a Excel sheet), in order to rename files. Obviously replace the old name with the new name specified for each case. For Example: Find what Replace With C:\Users\Documents\Pump Station.doc...

VBA Loop through all files in folder and remove invalid characters

vba,for-loop,file-rename,invalid-characters
I found function that replace invalids characters in file name. I would like to use this for all files in one folder. Function strLegalFileName(strFileNameIn As String) As String Dim i As Integer Const strIllegals = "\/|?*<>"":" strLegalFileName = strFileNameIn For i = 1 To Len(strIllegals) strLegalFileName = Replace(strLegalFileName, Mid$(strIllegals, i,...

Uploading multiple files and renaming - PHP

php,file-rename,multiple-file-upload
I'm uploading multiple files. Main function works fine, but I have to change the names of uploading files Like: name1.jpg, name2.jps, name3.jpg, ... $i = 1; if(move_uploaded_file($_FILES['upl']['tmp_name'], 'uploads/name'.$i++.'.'.$extension)){ echo '{"status":"success"}'; exit; } Number $i should grow with amount of uploaded files. I hope that explained it correctly....

Renaming all files in a folder

vb.net,loops,file-rename
I'm wondering if it's possible to rename all the files in a folder with a simple program, using vb.NET I'm quite green and not sure if this is even possible. Lets say there is a folder containing the files: Text_Space_aliens.txt, fishing_and_hunting_racoons.txt and mapple.txt. Using a few credentials: Dim outPut as...

Renamed files inside git

git,file-rename
I am a new programmer in a team. And at my first day I have this renamed file inside a stage, ready to be committed by git: $ git status On branch master Changes to be committed: (use "git reset HEAD <file>..." to unstage) modified: .gitignore new file: reports/SQLS.rar renamed:...

How does one rename multiple files within folders using python?

python,file,python-3.x,rename,file-rename
I have over 1000 folders in 'my documents'. In each folder there are only 4 photos that need to be named to 'North' 'East' 'South' and 'West' in that order. Currently they are named DSC_XXXX. I have written this script but it is not executing. import sys, os folder_list =...

Rename files within a folder chronologically by name

.net,file-rename
I got a little program that renames files within a folder. At this point it's almost working; the only problem that remains is that I want the program to rename the files alphabetically by name. This is my script now: If TextBox4.Text = "" Or txtbSti.Text = "" Or ComboBox3.Text...

Python program to rename file names while overwriting if there already is that file

python,python-2.7,rename,file-rename
As the title says, I wanted a python program that changes the file name, but I wanted to overwrite if there already is a file with that destination name. import os, sys original = sys.argv[1] output = sys.argv[2] os.rename(original, output) But my code just shows me this error when there...

Git merge conflict detected after moving some files

git,git-merge,file-rename
We are currently dealing with a bunch of files, all tracked on a git repository. At some point, we had to move part of those files, we did it using : git mv repo/file.c new_repo/ After some modifications on the "new_repo/file.c" (and by modification, I mean a lot of changes),...

append file date to file name using cmd

windows,date,batch-file,command-line,file-rename
Hi I'd like to create a bat file to rename files using the cmd. Say a friend and I went on vacation together. We have put all our pictures together and I now want to rename all the pictures in a sequence. Say I selected the following pictures: mypicture_3435.jpg (file...

renaming html file to have parent directory name

html,file-rename
I have a directory tree in which each folder contains (at this point) a single html file, all with the same name. I would like to rename each file so that it has the name of its parent directory. For example, change A\B\file1.html A\C\file1.html A\C\D\file1.html E\file1.html to A\B\B.html A\C\C.html A\C\D\D.html...

Mass renaming of files?

windows,batch-file,file-rename
I have a folder with 46 different text files, from 001.txt to 046.txt and I need to add another file to, say, spot 30. Is there a ways to rename all the files from 030.txt until 046.txt up by one number, so there is an empty spot for the new...