filenames

VBA UserForm Get Filename

十年热恋 提交于 2020-01-07 05:31:12
问题 I have constructed a UserForm that consists of 2 CommandButtons, each of which contains a Picture. The user is asked to select one of the two CommandButtons. I would like the filename of the picture selected to be copied to a cell in a worksheet. At the moment I can't figure out how to get the filename of the picture and so I have manually inserted the filename for each CommandButton, as such: Private Sub cmdQ2Opt1_Click() Worksheets("UserQuestionnaire").Range("C4").Value = "242.216.490" End

Include version number in exe file name in C# Visual Studio desktop application

我们两清 提交于 2020-01-06 19:27:47
问题 I looked everywhere for a solution, and I think that it's impossible to do that ! Can I include the version number (that is in AssemblyInfo.cs) into the .exe filename ? So I don't have anymore to rename the output exe file every release build. I just posted this question to be sure that in fact, it is impossible to do that. Otherwise, if someone has a working solution I'll be happy to know it. Thank you EDIT I'm not searching how to get the assembly version, which I can find, but I'm looking

upload images through php using unique file names

偶尔善良 提交于 2020-01-05 09:07:30
问题 I am currently in the process of writing a mobile app with the help of phonegap. One of the few features that I would like this app to have is the ability to capture an image and upload it to a remote server... I currently have the image capturing and uploading/emailing portion working fine with a compiled apk... but in my php, I am currently naming the images "image[insert random number from 10 to 20]... The problem here is that the numbers can be repeated and the images can be overwritten..

Why do these files have random strings for filenames?

隐身守侯 提交于 2020-01-05 07:30:31
问题 I've come across sites with CSS and JS filenames like this: css_pbm0lsQQJ7A7WCCIMgxLho6mI_kBNgznNUWmTWcnfoE.css What's causing this or why would you do it? Edit: Some of each answer below could apply to this scenario, but given the sites I've found this on, serving/caching methods seems the most accurate. 回答1: Versioning and making sure that correct version of static resources is being served. If you have a high traffic website and you serve lots of users you will have several layers of

Powershell: return filename with highest number

人走茶凉 提交于 2020-01-04 14:08:10
问题 Suppose I have a list of filenames like this: Get-ChildItem "Antarctica Data *.xls" Antarctica Data 03625516.xls Antarctica Data 84327262.xls Antarctica Data 16374175.xls Antarctica Data 12804427.xls Antarctica Data 17477809.xls Antarctica Data 60943758.xls Antarctica Data 93962083.xls Antarctica Data 74412097.xls Antarctica Data 81562648.xls Antarctica Data 58371936.xls How can I use Powershell to return a string of the filename with highest number? Antarctica Data 93962083.xls 回答1: Because

Extract only folder name right before filename from full path

╄→гoц情女王★ 提交于 2020-01-04 05:59:01
问题 I have the following path filePath <- "/data/folder1/subfolder1/foo.dat" I'd like to get subfolder1 which is where foo.dat locates. I saw solutions in other languages but haven't found one in R. What is the simplest way to do it? Thank you! What I tried > basename(filePath) [1] "foo.dat" > dirname(filePath) [1] "/data/folder1/subfolder1" 回答1: This may solve: filePath <- "/data/folder1/subfolder1/foo.dat" basename(dirname(filePath)) http://www.r-fiddle.org/#/fiddle?id=IPftVEDk&version=1 回答2:

how to convert filenames with special characters to valid filenames?

北城余情 提交于 2020-01-04 05:48:22
问题 I would like to know whether it is possible to REMOVE special characters recursively in powershell from all files in an entire directory structure? for example if I have a file called: my presentation (fix).xlsx I would like to rename it to: my presentation fix.xlsx thank you for your guidance. the reason we need to do this is we are migrating many files into sharepoint 2010 and sharepoint doesnt like files with special characters! 回答1: I haven't tested this code, but I think you probably

Getting short path in python

余生长醉 提交于 2020-01-04 03:19:05
问题 How do I obtain the short path of a file in Windows using python ? I am using the following code , #!/usr/bin/python import os import sys fileList = [] rootdir = sys.argv[1] for root, subFolders, files in os.walk(rootdir): for file in files: fileList.append(os.path.join(root,file)) for File in fileList: print File 回答1: I guess you are looking for this: http://docs.activestate.com/activepython/2.5/pywin32/win32api__GetShortPathName_meth.html Although you will need the win32api module for this.

Powershell: moving items not working when filenames that have chars [ ]

a 夏天 提交于 2020-01-03 13:07:10
问题 Quick question about moving items with PowerShell: does anyone know why the following script does not work when the filename has the [ or ] chars on it? (ex.: file1[VT].txt ) ls j:\ | foreach { $itemName = $_.Name.Replace('.', ' ') $destination = ls | where { $itemName -match $_.Name } | select -First 1 if ($destination -ne $null) { mi $_.PSPath $destination.PSPath -Verbose -WhatIf } } For instance, it will move the file if it's called file1.txt but it will simply ignore files named file1[VT]

Applescript - Creating folders based on the first word of the filename

放肆的年华 提交于 2020-01-03 05:04:19
问题 Essentially i'm looking for an applescript that allow me to order the massive 50.000 files by creating folders that have just the first word of the files, ignoring the rest of the filename after the first space. For eaxmple the 50.000 files are named like this: - amazingfrog -shootingbase.jpg - frog 2sHDn1_9fFs12s.jpg - frog 29adjjdd39939.mov - Horse IUS39aosdja.mov - horse 282131888.jpg - HORSE.jpg And so on..... - I would like to be like this: - amazingfrog -amazingfrog -shootingbase.jpg -