I need to find out how I can add a link to a Link list to a file in SharePoint whose filename changes weekly

This is a dupe of something asked several years ago and never answered. I have the same situation and need help finding a solution.

The SP site I’m working on has a few files that are updated periodically. I’ve been asked to find a way to add a link to them in a Links list webpart on the landing page that doesn’t require a manual update every time the date in a target filename changes.

The target files all have a fixed location and most of their filenames are fixed. The date portion of the filename changes periodically and irregularly.

We can’t add anything from the SharePoint store (heaven forbid we find an easy solution) or use jQuery.

Any leads are greatly appreciated.

handle space in filename for imagemagic command

I am trying to resize image based on file name and size :

import subprocess import os  os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'hiren.settings')  from hiren.settings import BASE_DIR   def resize(image_file, size):     os.chdir(BASE_DIR + '/convert/')     file_name = os.path.splitext(os.path.basename(image_file))[0]     file_ext = os.path.splitext(os.path.basename(image_file))[1]      for i in size:         cmd = ['convert', image_file, '-resize', i, file_name + i + file_ext]         # subprocess.check_call(f'convert {image_file} -resize {i} {file_name + i + file_ext}', shell=True)         subprocess.check_call(cmd, shell=True)   resize(BASE_DIR + '/convert/x/images 2.jpeg', ['308x412', '400x400']) 

then here is errors :

Traceback (most recent call last):   File "/home/../image.py", line 26, in <module>     resize(BASE_DIR + '/convert/x/images_2.jpeg', ['308x412', '400x400'])   File "/home/.../image.py", line 23, in resize     subprocess.check_call(cmd, shell=True)   File "/usr/lib/python3.6/subprocess.py", line 311, in check_call     raise CalledProcessError(retcode, cmd) Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org subprocess.CalledProcessError: Command '['convert', '/home/../convert/x/images_2.jpeg', '-resize', '308x412', 'images_2308x412.jpeg']' returned non-zero exit status 1. Copyright: © 1999-2017 ImageMagick Studio LLC License: http://www.imagemagick.org/script/license.php Features: Cipher DPC Modules OpenMP  Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib Usage: convert-im6.q16 [options ...] file [ [options ...] file ...] [options ...] file 

I am using python 3.6. Now how can I handle empty space or space less file name ?

file_put_contents – ISO 8601 date in filename returns failed to open stream: No such file or directory

I am trying to log errors to file using file_put_contents method.

I have tried the following code and it works:

file_put_contents(date("j-n-Y G:i").'.log', $  log, FILE_APPEND); 

But i want to name a file in ISO 8601 date format, like this:

file_put_contents(date("c").'.log', $  log, FILE_APPEND);  

But it returns the following error:

failed to open stream: No such file or directory 

getFileByServerRelativeURL fails when the filename contains a quote

I’m using the SharePoint online REST API. Things generally work fine, but I’m failing to figure out how to get information about a file (document) that contains a quote in its name. Here’s my REST call:

https://mysite.sharepoint.com/_api/Web/getfilebyserverrelativeurl("/Shared Documents/Roy's quoted doc.txt") 

The response I’m getting is ‘400 Bad Request’, with the error being “The expression “Web/getfilebyserverrelativeurl(“/Shared Documents/Roy’s quoted doc.txt”)” is not valid.”

I’ve tried all sorts of tricks with encoding the path (%27 encoding for the quote sign, backslashing the quote, etc.), but failed to figure out the right one.

Is there any kind of encoding I’m not aware of?

How to extern FILE *filename in C

I want to be able to use fprintf function from different c files

what am I doing wrong ?

I got three files:

1.c

#include "test.h" extern FILE *yyout2; void main() { yyout2 = fopen( "C:\test.txt", "w" ); printfile(); fclose(yyout2); } 

test.h

#ifndef TEST_H #define TEST_H #include <stdio.h> extern FILE *yyout2; void printfile(); #endif 

test.c

#include "test.h" void printfile() { fprintf(yyout2,"test"); } 

the error im getting is: Error 1 error LNK2001: unresolved external symbol _yyout2 C:\Users\Nati\Documents\Visual Studio 2010\Projects\test\test.obj

Uploading a file to Sharepoint on iPad modifies filename

I am using an iPad to upload files to a Sharepoint library from onedrive The SPO library is using modern experience

The added file names are changed after upload A guid is prepended to the file name Eg file to upload – testc3.docx Filename modified to 817BFD26-C1E2-4384-9663-1D9C59EC9C4Etestc3.docx

Anybody any ideas how I can prevent this from happening? Everything works fine on PC

view after uploading files on ipad

Firefox on MacOS: Default filename when downloading

When downloading from Firefox on MacOS, I would like the filename to be prefixed by the ISO-date (YYYY-MM-DD-original-filename.extension). This can be achieved with a folder action in the downloads folder, but I want it to be in all folders, so a folder action is not an ideal solution.

If possible I’d like all new files to have the prefix, regardless of the creating app.

Is this possible?

Is it possible to exact search Google photos by filename?

I would like to search Google photos images by their filename but I have a problem when two photos were taken at the same time and therefore their filenames and pretty similar – e.g., 20190430_092841.jpg and 20190430_092841(0).jpg. When searching the one with parenthesis, it works well but searching the other one displays both.

I have already tried both single and double quotation marks (both seems to do a different thing), plus and minus signs and many other symbols such as exclamation and quotation marks or backslashes with no luck.

Do you know if there is a way to force exact filename search which doesn’t ignore (0) at the end of the filename? Or do you know about some online documentation about photos search?

In the end, I would like to search for multiple images at the same time with the use of OR keyword (which seems to work), but first I need to solve this.

User can specify a directory for an auto-generated filename or specify an explicit filename


Software function

Allow the administrator of a piece of hardware to download the server configuration and store it in a data file for backup / migration purposes. The interface is currently setup as a wizard. The user is presented with simple choices on each screen. Forward and back buttons provide screen navigation.

Current behavior

  • User selects a folder to store the file into (default is user’s Documents directory)
  • Browse button brings up a folder browser
  • User enters more information (IP address, passwords, etc.)
  • User initiates download
  • Software generates a filename based on a template that includes the MAC address of the server and the time and date that the download was initiated

Sample screen

Desired behavior

  • Most users will still want the software to generate a filename based on a template (current behavior)
  • User has the option of specifying both a location and a filename to use

Options I’m considering

  • Add a screen on the wizard that allows a branch; i.e. “Select a folder to store the data with an auto-generated filename OR Specify a filename and location to use”
  • Put both options on a single screen selectable via radio button
  • Others?

I know that a standard solution to this is to present the user with a file browser that is pre-populated with a generated filename, but the fact that the file location is selected before the start of the process, coupled with the fact that the generated filename contains a timestamp based on the start of the process… This complicates the issue a bit.


EDIT with more workflow description


In hindsight, I guess I didn’t give enough background in the initial problem description. This is not just a “download and then save” type of operation.

  • The software client needs to collect a bunch of information from the user up-front before the download process starts. One of the pieces of information that is needed is where to store the data once it has been received.
  • When the user finishes entering all the information, because of the extent of the information entered, and the amount of time it may take a sysop to collect it all, we will present them with a summary page stating “this is what you are about to do” with a “do it” button on it.
  • I could prompt the user for the file location at the time they click the “do it” button, but it feels like the wrong place in the workflow to do so. It really feels like the selected location should be part of what is displayed in the summary information.
  • In addition to the “it feels wrong” that I stated above, once they click that “do it” button, and before the download begins, there is an arbitrarily long time during which the client will contact one or more external devices, collect information, make sure that all the pieces fit together correctly and that all the information the user entered looks good. If there is a problem, which is not at all unlikely, then the user may need to back up in the workflow and make changes and then restart. Should I prompt again for a file each subsequent time they click that “do it” button?
  • If I don’t make the file selection the very last thing that is done when the user pushes the “do it” button, then the time/date value I feed into the template at the time that they select the file location will be wrong. They could conceivably start filling out the information in the wizard at the end of the day, go home, and then start the process first thing in the morning the next day.
  • This is not implemented now, but we are considering in the future allowing the user to opt to schedule the download at some future time. It can be an intrusive process, and it might be nice to be able to schedule it to happen at a time when network traffic is low. If we implement this, then we definitely need to collect the file information well before the actual download takes place.

Hopefully this information clarifies the reason for my dilemma somewhat. Sorry for the confusion.