file-rename

how to control/save images took with android camera programmatically?

强颜欢笑 提交于 2019-12-11 08:18:22
问题 i've been trying to create a camera-related app. i know that i could create it programmatically from top, but i would prefer using the one that the phone supports. what i mean is, rather then creating the camera from 0, i would/could call the camera activity. after all, it provides all the system and gui that i needed. however, the problem is i wanted the result/image took to be saved in a folder that i created before, rather then saving it in the default camera folder. and also renaming the

Removing text from the middle of a file name with batch renaming

萝らか妹 提交于 2019-12-11 06:27:50
问题 I'm trying to de-organize a series of video files named like this: Something or Other.s1e1.mp4 Another title.s1e2.mp4 ... Yet More Titles.s1e87.mp4 And so on. What I want to do is strip out the "s1eNUM" part of the filename and restore it back to normal, so I'd get "Something or Other.mp4" and "Yet More Titles.mp4" and such. Can this be done using Windows command line, with ren and batch files? Or do I need special software? Thanks!! 回答1: Use the for command. @echo off set YourFileName=title

How do I rename files uploaded to an apps script web app form?

扶醉桌前 提交于 2019-12-11 05:25:00
问题 I've made a little web app form by splicing together some code I found. It works nearly perfectly for me, allowing me to upload files to a Google Drive folder, logging the data submitted in the form in a spreadsheet and emailing me when a file is uploaded. However, what I really want to be able to do is to rename the files that are uploaded according to the form data. For example, if the inputted manufacturer value = "Sony" and the date value = 12-04-2016, then make the filename "Sony_12-04

Rename file in zip with zip4j

末鹿安然 提交于 2019-12-11 04:53:44
问题 I'm using zip4j 1.3.1 to compress files in my application. Now I'm trying to rename the file inside the zip without having to rename the file itself. There seems to be a method for that, but it's not working. My code looks like: public static void zipFile(File dstPath, File srcFile, String optionalName) throws ZipException { ZipFile zipFile = new ZipFile(dstPath); ZipParameters parameters = new ZipParameters(); parameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE); parameters

Powershell - rename file using Date Taken attribute

非 Y 不嫁゛ 提交于 2019-12-11 04:31:39
问题 I have a stack load of images and videos on my Samsung phone. I copied these images to a USB then onto my PC. I want to use Powershell to rename these files based on their Date Taken attribute. Format required = yyyy-MM-dd HH.mm.ss ddd I have been using a Powershell script (see below) that does this beautifully using the Date Modified attribute, but the copy above somehow changed the Date Modified value on me (WTH!), so I can't use that now (as its not accurate). Get-ChildItem | Rename-Item

Does folders in windows have IDs? or GUIDs?

旧街凉风 提交于 2019-12-10 22:46:33
问题 what I'm trying to do, I'm selecting a folder and copying it, I would like to avoid copying it again if the folder got renamed. so is there an ID for each folder in windows that stick with the folder till its deleted ? C# would be perfect, or C++ 回答1: I think you looking somewhat like this :Unique file ids for Windows - Unique ID for files on NTFS? Windows can give a unique file indentifier using the function GetFileInformationByHandle() Example: (hFile is a handle to a file) BY_HANDLE_FILE

Append wc lines to filename

一世执手 提交于 2019-12-10 16:16:00
问题 Title says it all. I've managed to get just the lines with this: lines=$(wc file.txt | awk {'print $1'}); But I could use an assist appending this to the filename. Bonus points for showing me how to loop this over all the .txt files in the current directory. 回答1: find -name '*.txt' -execdir bash -c \ 'mv -v "$0" "${0%.txt}_$(wc -l < "$0").txt"' {} \; where the bash command is executed for each ( \; ) matched file; {} is replaced by the currently processed filename and passed as the first

How do I recursively rename folders with Powershell?

寵の児 提交于 2019-12-10 12:45:02
问题 Recursive renaming files using PS is trivial (variation on example from Mike Ormond's blog): dir *_t*.gif -recurse | foreach { move-item -literal $_ $_.Name.Replace("_thumb[1]", "")} I'm trying to recursively rename a folder structure. The use case is I'd like to be able to rename a whole VS.NET Solution (e.g. from Foo.Bar to Bar.Foo). To do this there are several steps: Rename folders (e.g. \Foo.Bar\Foo.Bar.Model => \Bar.Foo\Bar.Foo.Model) Rename files (e.g. Foo.Bar.Model.csproj => Bar.Foo

rename all the image files in a specified directory

佐手、 提交于 2019-12-10 12:14:40
问题 i am trying to create couple of lines of code which will rename all the jpg images in a specified directory.The parent directory was c:/xampp/htdocs/practice/haha/ .But renamed images are saved in c:/xampp/htdocs/practice/ My code do rename the file ,but problem is it deletes all the image file form the specied directory leaving the directory empty.It stores the renamed file in root php directory.And the newly created files are not clickable image file.So there are two problem i want to solve

Rename files using bash script

℡╲_俬逩灬. 提交于 2019-12-10 11:40:57
问题 I have a bash script set that executes in a folder containing a number of photos and sequentially stitches them into panoramas based on the user input. Once the generation is completed, the output file is renamed to $x-pano.jpg and moved one folder higher. My issue is the number prefix is based on the sequential execution of the script, meaning all files get renamed 1-pano.jpg to n-pano.jpg based on the number of panoramas generated during the script execution. How can I modify the renaming