Running select filename from dbo.sysfiles returns short foldernames with tilde

I am running the following statement in SQL Server 2014(in Windows 2012R2):

select filename from dbo.sysfiles where fileid = 1 

However it returns:

c:\progra~1\micros~1\mssql1~1.sql\mssql\data\master~1.mdf 

I wish for the full path without the tilde.

(e.g C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\DATA\master.mdf)

I tried upgrading the SQL Server 2014 Express to 2016 Express but it made no difference.

Any ideas? Thanks. Dave

Create DB snapshot without specifying the FILENAME attribute

I create DB snapshot as one of the tasks in SSIS package. The package works with 20 different DBs. Thus, each DB will have a snapshot with hard-coded FILENAME attribute.

CREATE DATABASE Sales_snap ON   (    NAME = SalesData,    FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\data\SalesData_snap.ss' ),   (    NAME = SalesData1,    FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\data\SalesData1_snap.ss' ),   (    NAME = SalesData2,    FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\mssql\data\SalesData2_snap.ss' )  AS SNAPSHOT OF Sales  

Is there a way to use some default path for FILENAME instead of copy-pasting the same string 20 x 3 times? Alternatively, is there any way to specify base path only once and then reuse it in other SSIS tasks?

How to find PHP filename and ID of the URL?

.htaccess is now a very common URL rewrite to make it SEO friendly and cover the database IDs.

What are the ways to explore php file on the server given to URL via .htaccess?

Example : The URL is www.domain.com/news/56.

I expect to find news.php?id=56 i.e. www.domain.com/news.php?id=56

Cannot update or upgrade: “files list file for package ‘libbrlapi0.5’ contains empty filename”

I cannot update or download anything. I have dug around quite a bit to attempt to rectify this. Admittedly I am far from knowledgeable about this stuff, but I have tried. All to no avail. Let me know if more information is needed. I have attempted a number of commonly suggested fixes but nothing seems to work, though I suppose user error (or incompetence) cannot be ruled out.

I am running Ubuntu 18.04.2 LTS.

Filename length restrictions for SharePoint Online?

I’m currently in the process of uploading (archiving) Remedy ticket attachments to SPO. When originally extracting attachments from the (Remedy) server, I ran into several instances where a file couldn’t be copied from one folder to another, due to filename length restrictions; I was using Server 2008 R2.

My question is, when uploading these files to SPO, will there be a chance of me getting warnings/errors due to filename lengths being too long? Should I go ahead and reformat all my file names to avoid this issue, or will I be okay without?

sha256sum: ‘filename’: No such file or directory

Contents of .sha256 file:

user@myHostname:~/Desktop/RT_N16/Merlin_JohnsFork$   cat sha256sum.sha256  545927719c46e359a0db6bf9dcb348f99c0f3d8786725780cb182994c61b19be  RT-N16_3.0.0.4_374.43_2-39L3j9527.trx 

An error is returned:

user@myHostname:~/Desktop/RT_N16/Merlin_JohnsFork$   sha256sum -c sha256sum.sha256 sha256sum: 'RT-N16_3.0.0.4_374.43_2-39L3j9527.trx'$  '\r': No such file or directory : FAILED open or read_2-39L3j9527.trx sha256sum: WARNING: 1 listed file could not be read 

Is this syntax incorrect or is there a problem with the .sha256 file?

sha256sum calculates checksum indicated in .sha256 file:

user@myHostname:~/Desktop/RT_N16/Merlin_JohnsFork$   sha256sum RT-N16_3.0.0.4_374.43_2-39L3j9527.trx 545927719c46e359a0db6bf9dcb348f99c0f3d8786725780cb182994c61b19be  RT-N16_3.0.0.4_374.43_2-39L3j9527.trx 

Select files and merge with same filename but different extension

I have a bunch of MP4s and Wav files in a folder with the same filenames, different file extension.

I want to replace the audio in the video files with the wav.

i.e. something like this:

for i in *.MP4;   do ffmpeg -i "$  i" -i "$  {i%.*}.wav" -c:v copy -map 0:v:0 -map 1:a:0   "$  {i%.*}_merged.mp4"; done 

Is this the right way to merge all the files?

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 ?