Renaming column in Content Type

I want to rename a column which is associated to Content Type i used the following to update all the columns which contains the column in the list but forgot to update the column name in the content type and not sure how to approach it

$ SiteURL = “http://pnpdemo” $ OldColumnName =”Target Folder” $ NewColumnName =”New Target Folder”

$ site = Get-SPSite $ SiteURL foreach ($ web in $ site.AllWebs) {

$ ListsToProcess= @()

$ Lists = $ web.Lists

 foreach ($  list in $  lists)  {       foreach ($  column in $  list.Fields)      {           if ($  column.Title -eq $  OldColumnName)          {                Write-Host "Found the Column in list: " $  list.Title " at "$  web.Url                #Send it to an Array                $  ListsToProcess+=$  List          }      }  } 

foreach ($ list in $ ListsToProcess) {

     $  column = $  list.fields | where {$  _.Title -eq $  OldColumnName}        $  column.Title = $  NewColumnName      $  column.Update() 

} $ web.Dispose() } $ site.Dispose()

Renaming multiple files at once, with the same extension

I’m currently in a situation, where I need to rename a bunch of files, inside different folders, with the same extension (SRT).

Currently, my directory “setup” is like this:

This is a folder (2000)    -      -      -      -  This is also a folder (2001)    -      -      -      - 

And I need to rename the SRT files to be like so:

This is a folder (2000)    -      -      -      -  This is also a folder (2001)    -      -      -      - 

Is there any way to go about this? I’m running an Ubuntu server, with only a terminal available.

If anyone can help me with this, I would be very grateful :).

Writing a pandas dataframe to a csv file and renaming on a for loop

I have a script that reads SQL db to a pandas data frame which is then concatenated together to form one dataframe on a loop. I need to write this second data frame to a csv file and rename this from a list of ID’s

I am using pd.to_csv to write the file and os.rename to change the name.

for X, df in d.iteritems():     newdf = pd.concat(d)     for X in newdf:                 export_csv = newdf.to_csv (r'/Users/uni/Desktop/corrindex+id/X.csv', index = False, header = None)                 for X in NAMES:                     os.rename ('X.csv',X) 

This is the code that concatenates the data frames together. In the third loop, NAMES = ‘rt35’ but in the future this will be a list of similar names.

I expect to get a file named rt35.csv. However I either get r.csv or X.csv and this error:

OSError: [Errno 2] No such file or directory 

The files are writing correctly, the only issue is the name.

Renaming images in Google Photos

How can I rename an image in Google Photos? From the web browser, I can add a description, but when I download the image, it uses the original file name. I need a real rename which changes the name such that if I download the image it retains the new name on download. I tried changing the name from Google Drive, but it did not propagate to Google Photos. Maybe it will do so eventually if I wait long enough???

I have hundreds of gigabytes of images stored in Google Photos, so downloading everything, changing the names locally, and then uploading isn’t an option. Additionally, it would be ridiculous to just change a few megabytes of actual data.

For the time being, and as a workaround, it appears that I have to disable sync on my Pixel phone until I have had a chance to rename them locally, and then sync in batches. This defeats the main feature of immediate back up of new images I take.

How can I rename images in Google Photos after I have already uploaded them without needing to do an expensive download + re-upload?

Finding and Renaming Mislabeled Duplicates

I inadvertently formatted a Time Machine backup external hard drive. I was able to recover many of the files, but not the names of those files.

All of the recovered files have generic names like “file01010101.doc”, which is not helpful. In order to know which files are duplicates, I need to compare the recovered files the originals I have on my machine, and have them renamed accordingly. Then, any files that still have a generic name must be unique and not a duplicate.

Question: How do I do this automatically? Is there a program, bash script, or Automator action that can do duplicate file finding and renaming? There’s almost 500,000 files, so doing this manually is not practical.

Automate moving and renaming files

I have files nested within multiple sub-folders. I want to move these files, one folder up the folder structure and rename the files as per its new parent folder. I will need this to be automated with a script.

Example logic

  1. Find Root folder
  2. Get contents of Subfolder of Subfolder files.
  3. Move files to its Parent folder (aka ‘Attachments’ folder)
  4. Rename files to with its current Parent folder name.
  5. Delete empty Subfolder
  6. Loop above action of Root folder folders until complete.

Example folder structure

enter image description here

Desired Result

enter image description here

I’m assuming this may require to Automate with a script but I have no idea how to do it. Can anyone help me?

issue with folder renaming in sharepoint

I don’t have access to rename folder in this sharepoint site/library while it appears to me I’ve got the ‘Full Control’ rights. I’ve sent a access request but it is sent to me Could you please help me to set the rights as I’m the admin of this library? Note: Some contents of this site have been provided with unique permissions. (inheritage was broken

bash file renaming for onedrive

I have a load of files from my teaching job that I want to put in onedrive on a regular backup. My colleagues are bad at naming files, so they need a cleanup for onedrive to take them.

The bit that I can’t get is how to select a space before a period.

I’m trying this

bash-3.2$   echo "foo bar .pdf" | tr -s " \." '\.' 

and getting this instead of foo bar.pdf

Does the Open and Close Principle relate to renaming a class

My coworker and I have having an argument. The Open and closed principle is defined as:

A module will be said to be open if it is still available for extension. For example, it should be possible to add fields to the data structures it contains, or new elements to the set of functions it performs. A module will be said to be closed if [it] is available for use by other modules. This assumes that the module has been given a well-defined, stable description (the interface in the sense of information hiding)

My coworker states that renaming a class (Private/Or Public) without increasing the MAJOR version violates the Open and Closed Principle.

My view is

  1. You should only increase the major version if it fully breaks functionality.
  2. Refactoring and class renaming do not fall under the open and close principle in general.

Does Renaming a class fall under the open and closed principle