Rename multiple files in a folder, add a prefix (Windows)

Option 1: Using Windows PowerShell Open the windows menu. Type: “PowerShell” and open the ‘Windows PowerShell’ command window. Goto folder with desired files: e.g. cd “C:\house chores” Notice: address must incorporate quotes “” if there are spaces involved. You can use ‘dir’ to see all the files in the folder. Using ‘|’ will pipeline the … Read more

Python regex – r prefix

Because \ begin escape sequences only when they are valid escape sequences. >>> ‘\n’ ‘\n’ >>> r’\n’ ‘\\n’ >>> print ‘\n’ >>> print r’\n’ \n >>> ‘\s’ ‘\\s’ >>> r’\s’ ‘\\s’ >>> print ‘\s’ \s >>> print r’\s’ \s Unless an ‘r’ or ‘R’ prefix is present, escape sequences in strings are interpreted according to … Read more

How to rename with prefix/suffix?

You could use the rename(1) command: rename ‘s/(.*)$/new.$1/’ original.filename Edit: If rename isn’t available and you have to rename more than one file, shell scripting can really be short and simple for this. For example, to rename all *.jpg to prefix_*.jpg in the current directory: for filename in *.jpg; do mv “$filename” “prefix_${filename}”; done; or … Read more

nvm is not compatible with the npm config “prefix” option:

Delete and Reset the prefix $ npm config delete prefix $ npm config set prefix $NVM_DIR/versions/node/v6.11.1 Note: Change the version number with the one indicated in the error message. nvm is not compatible with the npm config “prefix” option: currently set to “/usr/local” Run “npm config delete prefix” or “nvm use –delete-prefix v6.11.1 –silent” to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)