How to strip a file name and add it to array
Hello I am new to labview, and I need to know how to strip a file name and add it to an array. For example, filename joe.csv, then take "joe" and add it to an array with other inputs. A visual depiction will be very helpful
Attachments:
channel read and error check R03_v9(JHK).vi 101 KB
What does your code attachment have to do with your question?
What are "other inputs"?
I assume you have an array of strings. You can strip the filename using get file extension. You can build an array using build array. Wire the existing array on one input ant the string as a second input.
LabVIEW Champion . Do more with less code and in less time .
Similar Messages
-
How to get uploaded file name and path in BefExportToDat event script
I would like to get hold of the uploaded file name and full path in the event script "BefExportToDat", as I need to extract values from particular fields. However I have not yet found a way to do this.
- The input variable "strFile" returns the .Dat file path in the Outbox, to which it is about to export the data. This is no use to me.
- The API variable RES.PstrFilename is returning nothing
I am using RES.PstrFilename in the "BefFileImport" event script in a different FDM application and it works fine, however I need to find a way to get this to work in the "BefExportToDat" event script.
Please let me know how this might be achieved.I am looking through the API calls in FDM Workbench, but cannot see the table (tPOVPartitions) you mentioned listed. Is this the correct name? And do I just use the function listed in the object browser to run the query?
Furthermore (going back to my initial thoughts of using strFile), it appears that although the variable contains the .Dat filename and path, the actual file is non-existent when "BefExportToDat" is executed:
Error:
Error: Export failed.
Detail: File not found.
This would make sense, but it does make the variable "strFile" a little pointless since one cannot make use of the file in this particular event script. Do you please have any thoughts on this? -
How to find ATL file name and timestamp of importing for existing DI code?
A tester is not sure about the version of the ATL code which was imported into his local repository. Is there anyway he can get the imported ATL file name and/or timestamp from the repository or a log file? I searched in both places but couldn't find any information. Did I miss something? This is DI 11.5.3.
Thanks,
LarryI don't think the information about the source of how the object was created in repo is maintained anywhere, like this version of object was created from ATL or from Designer etc
but different versions of objects are stored in AL_LANG and its language in AL_LANGTEXT table, if you have not compacted the repo, you may get the last modified time from AL_ATTR table, try getting the data from these table and see if you get any info that is useful for you -
How to view long file names and sort files within folders/projects?
Hello, like so many people here, I am a new mac user, but certainly not computer illiterate. I have been a professional photographer for 10 years and recently change to mac and have been slowly trying to adapt my work flow accordingly.
However I have become increasingly frustrated with Aperture 3 and after reading posts here it looks like I am certainly not the only person. While in my case I am sure it is because of my inexperience with mac systems so any guidance or assistance is much appreciated.
Hopefully my questions are simple. I have been importing my images and re-naming images as I do so. A very simple combination of date, custom name, and counter. However, when I look at the images once the import has completed, they are not in any logical order within the 'project'. I have tried to sort them by file name, orientation, file size, etc, both ascending and descending, but they will not list in the correct order. eg the file '2010-03-09 Lyon France 001', continually falls between '2010-03-09 Lyon France 022' and '....021'.
This has also lead me to a further question. While my file names can generally be read when the image is a landscape format, on the portrait images the file name it too long for me to read the whole name, and I can not find anyway to read the file name, eg browser, split screen, viewer, or full screen.
Im sorry for all the details, and I am sure it is just my lack of experience, so appreciate your help.
PS. On a separate note, I notice on another thread from the frustrated user 'ultratechy' that he got a reply from Tony who stated 'Also after installing any application you should always run disk utility and repair permissions....' Now as I am completely new to mac, I had no idea about this. Any other tips that I should always be aware of? Thanks again.Thanks for your reply Calx. If it makes you feel better, I am actually a New South Welshman - just living in the sunshine state!
You are correct, I am trying to get my head around a new way of working and thinking, but I suppose it will all become clearer as time goes by. I have re-visited the manual many times, and been doing loads of research online, but just trying to put it all into practice now, so any tips or advice is always appreciated.
At the moment, I am just working with a small part of my library until I do get my head around things before moving onto the bulk of my images. I have my images stored and backed up on multiple external hard drives. I am trying to import my images into aperture from an external drive as I have been slack over the years with keywording, metadata, organising, etc etc, so I figure from what I have read that aperture may assist me with making these time consuming tasks a bit quicker and easier.
I have put a bit of thought into my filing structure, but I am sure that with further use and understanding, this may change in the future, but I hope not. To give you an example of how I am thinking and working - I have used folders for my regular clients, eg, Ray White, and then made another level of folders within 'Ray White' for the date, and then in each 'date folder' I place my projects and name them with the address of the property I have photographed. I select and edit images from each project and place them in albums under each project. Not sure if this is the most perfect structure, but any advice is welcome.
Keywords is always an issue with me. Over the years I have compiled a number of list for each client and each 'type' of photography. For example, real estate images have there own list, I just simply manually add keywords for specific jobs, eg the address and any specific location or features.
Again, advice and guidance always welcome and I would appreciate how you go about these topics? And maybe you can help explain something that I have pre-emted may be a problem, and it may happen when I move onto my larger library, and I am not sure how to explain this as it may show my lack of management previously. When I worked on my PC, I used PS4, Adobe Bridge and Camera RAW pretty much exclusively. For my landscape images for example, I might have 2 or 3 variations of the one images, eg, black and white, sepia, and color for instance. But the file name remained the same, I just stored them in different folders indicating what version of the image was stored there. Now I am thinking that when I import images in Aperture, I will come across difficulties because Aperture will think the I am importing duplicate images because I will in fact have 3 images with the same file name, even though the adjustments I have made to them are different. Is this the case? Will I have to make adjustments again? Will I have to change the name of the files prior to importing? If so, any advice or tips?
Well, I should stop there. Im sorry to bombard you with some much text, but as mentioned, I am new, and finding my feet, so thanks for your time. -
How to copy a files name and spotlight comments to a text file for an entire folder
I have movie covers saved as a jpeg for every movie my family and I own. There is about 700 and they each have a comment of the main actors, release dates, and descriptions. This makes it easy to find what to watch. I want my parents to have all of this info but they have a windows laptop so the comments don't transfer with the file and can't be searched like you can on a mac. Is there an applescript, automator, program I can download, or program code supported in xcode that will do at least one of the following things?
1)Take the name of the picture file and spotlight comment, copy and paste it into a text document like word that looks like this...
File Name1- Spotlight Comment for file 1
File Name 2- Spotlight Comment for file 2
. for all 700 files in a folder
2) It would be equally helpful if there was something that would take the name of the picture file and spotlight comment, copy and paste it to a movie file's comments with the same name but obviously has different extention. For an example
In a Pictures folder
Name: Dark Knight, The.jpeg Comment: (2008) Genre: Action... <- copy comment
In a Movie Folder
Name: Dark Knight, The.m4v Comment: <- paste
and do this for all 700 files
3) Is there a free photo program that works on mac and windows that I can put all my movie pictures in and have a description like I did with the comments? It would also need a place that to search the description for keywords. So Basically an itunes for pictures that works on both mac and windows. If so I still need a way to get the spotlight comments to the description.
4) I feel like this would make things more difficult, but if not I can put all of the .m4v files in itunes so instead of pasting all the comments back into a file in finder paste them in a description in itunes
5) At the very least a code that I can run one by one for every file that will paste the comments into the same document
Note: When I say spotlight comments I mean the comment box that is available when you click on get info of a file. The pictures are in the pictures section of finder in a folder called Movie Pictures. The movie files are on an external hard-drive in a file called Movies. Also I am slightly familiar with applescript and automater in that I have used both to create keyboard shortcuts and simple voice commands. I have programmed in c++ and C too. So If you give me a code for applescript I do know what to do with it.
Thanks to anyone who takes the time to read all of this and extra thanks to anyone who tries to help.Clendenen02 wrote:
2) It would be equally helpful if there was something that would take the name of the picture file and spotlight comment, copy and paste it to a movie file's comments with the same name but obviously has different extention. For an example
In a Pictures folder
Name: Dark Knight, The.jpeg Comment: (2008) Genre: Action... <- copy comment
In a Movie Folder
Name: Dark Knight, The.m4v Comment: <- paste
and do this for all 700 files
This Bash script will do it.
Edit "PicDir" and "MovDir" to the location of your Folders
(Note: The comment is written to the m4v file using xattr, so the Spotlight comment field appears blank in Finder, but the comment metadata is still indexed by Spotlight (If you add a Spotlight comment from Finder, it is stored both as an extended attribute and in a .DS_Store file)
#!/bin/bash
PicDir=$HOME/Desktop/Pictures
MovDir=$HOME/Desktop/Movies
for f in $PicDir/*
do
if [ ! -d "$f" -a "${f##*.}" == "jpeg" ]; then
comment=$(mdls -raw -name kMDItemFinderComment "$f")
if [[ $comment != "(null)" ]]; then
picname=${f##*/}
movname=${picname%.*}.m4v
if [ -e "$MovDir"/$movname ]; then
xattr -w com.apple.metadata:kMDItemFinderComment "\"$comment\"" "$MovDir"/$movname
fi
fi
fi
done -
How to list long file names and paths longer than 260 characters in vbscript?
Hi there,
I have looked in different posts and forums, but couldn't find an answer to my question.
So, here it is... imagine the small piece of code attached below. I need to be able to iterate and rename recursively (I didn't include the recursive part of the code in order to keep things simple) through files and folders in an user selected path. I thought that by using vbscript FileSystemObject I would be able to do so.
Unfortunately, it seems like the Files method does not detect files whose path is larger than the OS 260 (or 256?) character limit. How could I do it so? Please, don't tell me to use something different than vbscripts :-)
Thanks in advance!
Set FSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = FSO.GetFolder(Path)
Set colFiles = objFolder.Files
For Each objFile In colFiles
Wscript.Echo "File in root folder:" & objfile.Name
NextYes, that describes the problem, but not the solution - short of changing the names of the folders. There is another solution. That is, to map a logical drive to the folder so that the path to subfolders and files is shortened. Here is a procedure that offers a scripted approach that I use to map folders with long names to a drive letter and then opens a console window at that location ...
Dim sDrive, sSharePath, sShareName, aTemp, cLtr, errnum
Const sCmd = "%comspec% /k color f0 & title "
Const bForce = True
if wsh.arguments.count > 0 then
sSharePath = wsh.arguments(0)
aTemp = Split(sSharePath, "\")
sShareName = aTemp(UBound(aTemp))
cLtr = "K"
with CreateObject("Scripting.FileSystemObject")
Do While .DriveExists(cLtr) and UCase(cLtr) <= "Z"
cLtr = Chr(ASC(cLtr) + 1)
Loop
end with
sDrive = cLtr & ":"
Else
sDrive = "K:"
sSharePath = "C:\Documents and Settings\tlavedas\My Documents\Script\Testing"
sShareName = "Testing"
end if
with CreateObject("Wscript.Network")
errnum = MakeShare(sSharePath, sShareName)
if errnum = 0 or errnum = 22 then
.MapNetworkDrive sDrive, "\\" & .ComputerName & "\" & sShareName
CreateObject("Wscript.Shell").Run sCmd & sDrive & sShareName & "& " & sDrive, 1, True
.RemoveNetworkDrive sDrive, bForce
if not errnum = 22 then RemoveShare(sShareName)
else
wsh.echo "Failed"
end if
end with
function MakeShare(sSharePath, sShareName)
Const FILE_SHARE = 0
Const MAX_CONNECT = 1
with GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
with .Get("Win32_Share")
MakeShare = .Create(sSharePath, sShareName, FILE_SHARE, MAX_CONNECT, sShareName)
end with
end with
end function
sub RemoveShare(sShareName)
Dim cShares, oShare
with GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set cShares = .ExecQuery _
("Select * from Win32_Share Where Name = '" & sShareName & "'")
For Each oShare in cShares
oShare.Delete
Next
end with
end sub
The SHARE that must be created for this to work is marked as having only one connect (the calling procedure). The mapping and share is automatically removed when the console window is closed. In the case cited in this posting, this approach could be applied using the subroutines provided so that the user's script creates the share/mapping, performs its file operations and then removes the mapping/share. Ultimately, it might be more useful to change the folder structure, as suggested in the KB article, since working with the created folders and files will still be problematic - unless the drive mapping is in place.Tom Lavedas -
How to read a file name and send it a particular reciever
Hi,
I have a scenario, where i am receiving a a file and based on the file name i have to decide who is the receiver and send it to that particular receiver.I do not have to do any mapping.
can someone suggest me how can I achieve this.
Thanks in advance.HI This may help you.Let me know if not.
Step by Step Guide: XML File 2 XML File Scenario: Part I
Step by Step Guide: XML File 2 XML File Scenario: Part II
Converting XML to PDF using XI
Introduction to simple(File-XI-File)scenario and complete walk through for starters(Part1)
Introduction to simple (File-XI-File)scenario and complete walk through for starters(Part2)
"JAVA MAPPING", an alternate way of reading a CSV file
Dynamic File Name using XI 3.0 SP12 Part - I
Dynamic file name(XSLT Mapping with Java Enhancement) using XI 3.0 SP12 Part -II
Push Data to MVC Architectured application using XI
How to send any data (even binary) through XI, without using the Integration Repository
XI in the role of a FTP
The specified item was not found.
The specified item was not found.
The specified item was not found.
The specified item was not found. -
How to get target file name and buffer the incoming messages?
Hi Experts
I have one scenarion like
I wanted to find whether is there any file existing in target folder. If it exists I dont want to overwrite it but I have to buffer the incoming messages in some queue or something like that. And when ever the request comes next time I have to send the data buffered in queue first.
I dont want to add any time stamp for target file to avoide duplication.
Can we do this using XI. If yes please suggest me how to achive this.
Regards
Sowmya>
Sowmya wrote:
> Hi Experts
>
> I have one scenarion like
> I wanted to find whether is there any file existing in target folder. If it exists I dont want to overwrite it but I have to buffer the incoming messages in some queue or something like that. And when ever the request comes next time I have to send the data buffered in queue first.
>
> I dont want to add any time stamp for target file to avoide duplication.
>
> Can we do this using XI. If yes please suggest me how to achive this.
>
>
> Regards
> Sowmya
there is no standard way to achieve this. I suggest a redesign.
post the files to a different directory and write a script which will move the file to the required target directory only if it is not present there. -
Log4j : how to get log file name and directory
My log4j is working fine. Below is how I define the property file
log4j.rootCategory=DEBUG, A1
log4j.appender.A1=org.apache.log4j.RollingFileAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
log4j.appender.A1.File=temp/log.txtI want to know, from my java program, how to retrieve my log file "temp/log.txt" because I want to display at console and notify user where to find the log file.
ThanksOr perhaps I did not understand your requirement. Which of the following is it?
1. Given some Java class, you need to do something with its source code?
2. Given some file whose path is specified by user input or runtime configuration or compile-time constant, you need to do something with that file?
3. Neither of the above?
If 1: Can't do it. Don't need to do it. Don't waste your time trying. Unless you're writing something like a debugger. If so, then if you have to ask this question, you do not have the skills necessary for the broader task.
If 2: Google for java io tutorial. Study it, try some code, and come back with a more specific question if you're still confused.
If 3: Explain clearly what you're trying to accomplish and why you think this approach is the right one. -
Hi everybody,
I will appreciate if somebody could tell me how to read the file name and extension of already uploaded to DMS document (a function module will be best but name of db table is ok too). Is this information stored in SAP DB at all?
Thanks
OgnianaCheck
http://help.sap.com/saphelp_erp2004/helpdata/en/c6/893d55449311d1893e0000e8323c4f/content.htm
Regards,
Santosh -
How to insert the file name to column
When user upload the file, in order to avoid the double file name conflict, so I need to change the file name to something else, but I still need save the former file name to some column to download the file with correct file name, I know how to rename and upload file, but I don't know how to catch the file name and save it to some column when using addt insert transaction?
Hi,
As I said earlier, you have to maintain the list of filename's "itemdescr" in different temp file and load it an and when required table instead of checking for round robin functionality. If you are looking forward that oracle sqlldr can able to access the filename as one of the parameter then - it might not possible AFAIK.
else perform the direct insert on the table from sqlclient.
- Pavan Kumar N -
How to print the report file name and path and the last mod date
Good morning,
I am trying to print on the footer of the report the report file name and path as well as the report last modification date.
Anyone would know how I can do that? I have checked the doc but found nothing.
Thks. Philippe.Did you ever determine how to print report name and report last mod date?
Thanks -
Get the pc name with domain name and add it to my properties file using commands
i want to get the pc name with domain name and add it to my properties file using powershell .
sidfunction Get-Environment{
[environment]|Get-Member -Static -MemberType Properties |
ForEach-Object{
if($_.Name -ne 'StackTrace'){
$v=[scriptblock]::Create("[environment]::$($_.Name)").Invoke()
New-Object PsCustomObject -Property ([ordered]@{Name=$_.Name;Value=$v[0]})
Get-Environment
Get-Environment | Out-String | Out-File environment.txt
¯\_(ツ)_/¯ -
How to print file name and date on document
How can we print the file name and date, like in the old days, on a document as a header or footer?
Not the print dialog for iWork but in the app itself. Here is Pages:
Regards,
Colin R. -
How to set file name and destination folder without user interaction
how can I set the file name and destination folder to generate a pdf file like "c:\myfolder\document.pdf" in this folder automatically.
Is there a tag in .joboptions ?
Goal: User click print button. In the background a pdf will be generated in e.g. "C:\myfolder\document.pdf".
that`s it.
I know that the query dialog for save as can be turned off. But the file name depends on the application.
Thanks for your help.
TKHello,
Please post this in PI forums
Regards, Anil
Maybe you are looking for
-
Problem validate the input payload in a bpel process
Hi I am trying to validate the input payload in a bpel process and need to catch the exact validation error . I am using the validate activity or validate property I am getting the error as <process> <main (80)> receiveInput (pending) Jun 21, 2013 12
-
Dvr620ku only shows black and white using HDMI cable
I connected the av cables and they showed black and white, now im connected through hdmi and same problem watching vcr tapes... what can I do besides trying a component cable?
-
What's the deal with the video format?
Hello! What is the deal with the video format? Does it mean I have to code the videos for 640*480 ? It won't accept any other size? What size do I need to select for widescreen format? With Quicktime pro I've been able to encode videos with a very ni
-
Our DBA duties are currently outsourced and I'm just curious about something. We asked them to copy a schema from our Production database (during the day) down to it's equivalents in the Acceptance and Test environments. We found a problem in that th
-
Adobe Acrobat 8 phone activation
I have Adobe Acrobat 8.0 installed on a Windows 2003 server. It was working fine, but is now prompting again for activation. The activation over the internet option does not work. Phone activation appears to no longer be supported. The url qouted in