Find and Read the Target Spreadsheet File from Target Folder
I'm trying to find and read the target spreadsheet file from the target folder. Please help. Thanks.
Solved!
Go to Solution.
If you know the folder, you could do a List Folder Contents to get a list of files in that folder. You can then just use Array Index to get the file you want.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Similar Messages
-
I have a friend who I was helping out with his iPhone. He has since lost it. I believe I backed it up to my machine but have no idea where to find it. Is it possible to find it and read the back-up file without the original device being connected?
If he gets another device - you should be able to restore it from your computer to the point where you backed it up
Otherwise that file cannot be read -
Hello everyone,
I’ve been assigned one requirement wherein I would like to read around 50 CSV files from a specified folder.
In step 1 I would like to create schema for this files, meaning take the CSV file one by one and create SQL table for it, if it does not exist at destination.
In step 2 I would like to append the data of these 50 CSV files into respective table.
In step 3 I would like to purge data older than a given date.
Please note, the data in these CSV files would be very bulky, I would like to know the best way to insert bulky data into SQL table.
Also, in some of the CSV files, there will be 4 rows at the top of the file which have the header details/header rows.
According to my knowledge I would be asked to implement this on SSIS 2008 but I’m not 100% sure for it.
So, please feel free to provide multiple approaches if we can achieve these requirements elegantly in newer versions like SSIS 2012.
Any help would be much appreciated.
Thanks,
Ankit
Thanks, <b>Ankit Shah</b> <hr> Inkey Solutions, India. <hr> Microsoft Certified Business Management Solutions Professionals <hr> http://ankit.inkeysolutions.comHello Harry and Aamir,
Thank you for the responses.
@Aamir, thank you for sharing the link, yes I'm going to use Script task to read header columns of CSV files, preparing one SSIS variable which will be having SQL script to create the required table with if exists condition inside script task itself.
I will be having "Execute SQL task" following the script task. And this will create the actual table for a CSV.
Both these components will be inside a for each loop container and execute all 50 CSV files one by one.
Some points to be clarified,
1. In the bunch of these 50 CSV files there will be some exception for which we first need to purge the tables and then insert the data. Meaning for 2 files out of 50, we need to first clean the tables and then perform data insert, while for the rest 48
files, they should be appended on daily basis.
Can you please advise what is the best way to achieve this requirement? Where should we configure such exceptional cases for the package?
2. For some of the CSV files we would be having more than one file with the same name. Like out of 50 the 2nd file is divided into 10 different CSV files. so in total we're having 60 files wherein the 10 out of 60 have repeated file names. How can we manage
this criteria within the same loop, do we need to do one more for each looping inside the parent one, what is the best way to achieve this requirement?
3. There will be another package, which will be used to purge data for the SQL tables. Meaning unlike the above package, this package will not run on daily basis. At some point we would like these 50 tables to be purged with older than criteria, say remove
data older than 1st Jan 2015. what is the best way to achieve this requirement?
Please know, I'm very new in SSIS world and would like to develop these packages for client using best package development practices.
Any help would be greatly appreciated.
Thanks, <b>Ankit Shah</b> <hr> Inkey Solutions, India. <hr> Microsoft Certified Business Management Solutions Professionals <hr> http://ankit.inkeysolutions.com
1. In the bunch of these 50 CSV files there will be some exception for which we first need to purge the tables and then insert the data. Meaning for 2 files out of 50, we need to first clean the tables and then perform
data insert, while for the rest 48 files, they should be appended on daily basis.
Can you please advise what is the best way to achieve this requirement? Where should we configure such exceptional cases for the package?
How can you identify these files? Is it based on file name or are there some info in the file which indicates
that it required a purge? If yes you can pick this information during file name or file data parsing step and set a boolean variable. Then in control flow have a conditional precedence constraint which will check the boolean variable and if set it will execute
a execte sql task to do the purge (you can use TRUNCATE TABLE or DELETE FROM TableName statements)
2. For some of the CSV files we would be having more than one file with the same name. Like out of 50 the 2nd file is divided into 10 different CSV files. so in total we're having 60 files wherein the 10 out of 60 have
repeated file names. How can we manage this criteria within the same loop, do we need to do one more for each looping inside the parent one, what is the best way to achieve this requirement?
The best way to achieve this is to append a sequential value to filename (may be timestamp) and then process
them in sequence. This can be done prior to main loop so that you can use same loop to process these duplicate filenames also. The best thing would be to use file creation date attribute value so that it gets processed in the right sequence. You can use a
script task to get this for each file as below
http://microsoft-ssis.blogspot.com/2011/03/get-file-properties-with-ssis.html
3. There will be another package, which will be used to purge data for the SQL tables. Meaning unlike the above package, this package will not run on daily basis. At some point we would like these 50 tables to be purged
with older than criteria, say remove data older than 1st Jan 2015. what is the best way to achieve this requirement?
You can use a SQL script for this. Just call a sql procedure
with a single parameter called @Date and then write logic like below
CREATE PROC PurgeTableData
@CutOffDate datetime
AS
DELETE FROM Table1 WHERE DateField < @CutOffDate;
DELETE FROM Table2 WHERE DateField < @CutOffDate;
DELETE FROM Table3 WHERE DateField < @CutOffDate;
GO
@CutOffDate which denote date from which older data have to be purged
You can then schedule this SP in a sql agent job to get executed based on your required frequency
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
How do I find and save the background music file of my Flash site?
I see that the background music in my Flash site is located in a symbol called muz. When I click the properties of this symbol, the sound file's location is listed as .\flash\sound\muz.wav I couldn't find that sound sub-folder in the flash folder nor could I find the file. I tried doing a search to look for the muz.wav file in my computer but it could not be found. Does anyone know how I can find and save this file? Can the symbol somehow be exported and the sound file be extracted that way?
I copied and pasted the symbol into an empty .fla file. This new .fla file is just 1 frame. Can you tell me what you mean by "spreading" it along the timeline? When I tried exporting it to a .wav file (as just 1 frame in timeline), I only hear a fraction of a fraction of the first note of the music in the generated .wav file. The music is heard fine in its entirety when previewing the .fla file (F12).
By the way, in the symbol's properties, there is an option to "Export for ActionScript" and an option to "Export for runtime sharing". Do you think any of these would work? -
How to find and edit the seeded invoice template from receivables
Hi,
I want to edit the seeded invoice template which comes from receivables. How can I see the name of the template, as I run the invoice from Transaction -> Transactions -> Open an Invoice and then click on the button next to the Transaction Number. I have tried finding it in XML Publisher responsibility, but I cannot find that particular template.
Thank you in advance!Hi,
I believe I have my answer now, or at least a good thread on the subject going hear:
http://forums.java.net/jive/thread.jspa?threadID=45148
Thanks,
Mark -
Hello Gurus,
I have an aged XP machine with a large music library in ITunes. iTunes will not run any longer (tried uninstalling and reinstalling etc to no avail) but the music files are backed up onto an external drive so all safe. I have purchased a Mac which of course already has iTunes installed and I can copy the music files onto the Mac, but can I simply copy and paste the iTunes library files from the XP machine to the Mac so that all of the playlists, tags, ratings etc transfer, or do I have to start again?
Thanks for the advice.Sounds like you have a split library. Ideally you would make this portable before attempting to move it to the Mac. See make a split library portable for details.
Perhaps you can get iTunes running on the old box long enough to sort things out...
For general advice see Troubleshooting issues with iTunes for Windows updates.
The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down page in case one of them applies.
Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
You will also want to deauthorize the XP system once everything is working properly on the Mac.
tt2 -
File Name Copy (not text inside the file ) and change the extension of file
Hi,
I have a requirement in which I have to copy the file name (not the text inside file ) from one folder/dir to another folder/dir with some another extension.
Suppose we have file abc.txt of 20kb in a folder ,we need this in another folder with abc.done extension of 0 kb.
This I need just to trigger a process.
I have a below code to copy some files from one folder to another but this code copies the complete file not the file name only.Need help.
package com.sumit.collections;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.channels.FileChannel;
public class FileMove {
* @param args
* @throws IOException
public static void main(String[] args) throws IOException {
FileMove fm=new FileMove();
fm.copyFiles();
public void copyFiles() throws IOException {
File destination=new File("C://soft//test2");
File srcDir = new File("C://soft//test");
File[] files = srcDir.listFiles();
FileChannel in = null;
FileChannel out = null;
for (File file : files) {
try {
in = new FileInputStream(file).getChannel();
File outFile = new File(destination, file.getName());
out = new FileOutputStream(outFile).getChannel();
in.transferTo(0, in.size(), out);
} finally {
if (in != null)
in.close();
if (out != null)
out.close();
Thanks
SumitThanks for all your help.I got the solution.
package com.sumit.collections;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class DotDoneFile {
public static void main(String[] args) throws IOException {
DotDoneFile fm=new DotDoneFile();
fm.copyFiles1();
public void copyFiles1() throws IOException {
List<String> filnamne = new ArrayList();
File destDir = new File("C://Barcklays-soft//test2");
File srcDir = new File("C://Barcklays-soft//test");
File[] listOfFiles = srcDir.listFiles();
try{
for (int i=0;i<listOfFiles.length;i++){
if (listOfFiles.isFile())
filnamne.add(listOfFiles[i].getName());
System.out.println(listOfFiles[i].getName());
File.createTempFile(listOfFiles[i].getName(), ".done", destDir);
catch(IOException ioe)
System.out.println("Exception creating temporary file : " + ioe); -
I paired my old LG phone using bluetooth exchange and uploaded all of the Voice Memo files from it to my macbook and I can't find the file, where would it be located ?
You cannot update iPhone 4 to IOS 8.1.2, the highest you can update is IOS 7.1.2.
Unless you've iPhone 4S (looks similar to iPhone 4) -
I have some troubles recently with Final Cut Pro 7 and would like to remove my preferences. I can't find any "com.apple.finalcutpro.plist" file from the Preferences folder but I do have some preferences. So, where could be the file ?
Digital Rebellion has you covered: http://www.digitalrebellion.com/prefman/
-
Writing the file using Write to SGL and reading the data using Read from SGL
Hello Sir, I have a problem using the Write to SGL VI. When I am trying to write the captured data using DAQ board to a SGL file, I am unable to store the data as desired. There might be some problem with the VI which I am using to write the data to SGL file. I am not able to figure out the minor problem I am facing. I am attaching a zip file which contains five files.
1) Acquire_Current_Binary_Exp.vi -> This is the VI which I used to store my data using Write to SGL file.
2) Retrive_BINARY_Data.vi -> This is the VI which I used to Read from SGL file and plot it
3) Binary_Capture -> This is the captured data using (1) which can be plotted using (2) and what I observed is the plot is different and also the time scare is not as expected.
4) Unexpected_Graph.png is the unexpected graph when I am using Write to SGL and Read from SGL to store and retrieve the data.
5) Expected_Graph.png -> This is the expected data format I supposed to get. I have obtained this plot when I have used write to LVM and read from LVM file to store and retrieve the data.
I tried a lot modifying the sub VI’s but it doesn’t work for me. What I think is I am doing some mistake while I am writing the data to SGL and Reading the data from SGL. Also, I don’t know the reason why my graph is not like (5) rather I am getting something like its in (4). Its totally different. You can also observe the difference between the time scale of (4) and (5).
Attachments:
Krishna_Files.zip 552 KBThe binary data file has no time axis information, it is pure y data. Only the LVM file contains information about t(0) and dt. Since you throw away this information before saving to the binary file, it cannot be retrieved.
Did you try wiring a 2 as suggested?
(see also http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=925 )
Message Edited by altenbach on 07-29-2005 11:35 PM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
Retrive_BINARY_DataMOD2.vi 1982 KB -
when I am open file with adobe Pro and reader the resolution in my computer failing, change the resolution from 1920x1200 to 800x600. my video card is nvidia quadro 2000. w7 & 32 bits
Hi fabiangs,
I'm not sure that I follow. Are you saying that when you open a PDF file in Acrobat or Reader, that the display resolution changes automatically on your system?
What version of Acrobat/Reader are you using? Do you see this same issue in other files/applications?
I look forward to hearing back from you.
Best,
Sara -
Can you get an iphone 5 at target that uses AT&T or Verizon network and use the Straight Talk plan from Walmart? I don't have AT&T or Verizon network and I don't want to get them but I was just wondering if you can get the iphone 5 that is at target and use it for the straight talk plan. I will be getting the straight talk plan but I would like to do some research on the iphone 5 first for straight talk. At walmart the phone is $544.99 and I think it will be a lot cheaper to buy it at target.
Thank You!When I use find file http://www.macupdate.com/app/mac/30073/find-file (which does tend to find files that "Finder" can't), it's not coming up with any other itunes library files that have been modified in the past week, which I know it would have been - unfortunately, I don't have a very recent backup of the hard drive. It would be a few months old so it wouldn't have the complete library on it....any ideas? I'm wondering if restarting the computer might help but have been afraid to do so in case it would make it harder to recover anything...I was looking at this thread https://discussions.apple.com/thread/4211589?start=0&tstart=0 in the hopes that it might have a helpful suggestion but it's definitely a different scenario.
-
I have backed up my disk using Time Machine. I then deleted the back-up files from my MacBook hard drive.
I then reconnected my external hard drive and find the files I deleted from my hard drive are also deleted from
my external hard drive. Can someone tell my what what happened? I'm confused.Hello,
Time Machine is not a good way to do that, when it eventually needs more room it deletes old Backups to make room.
If you really want to keep Files but remove them from the Internal Drive, then I'd get another external drive to copy or clone them to that is not used for TM. -
In finder I cannto easily change files from one folder to another. There should de a cut and paste for this. Not drag and drop. thanks P.
paulfromqueretaro wrote:
In finder I cannto easily change files from one folder to another. There should de a cut and paste for this. Not drag and drop. thanks P.
OS X is all about keyboard shortcuts.
To cut cmd+x
To copy cmd+c
To paste cmd+v
With the Mouse, hold command and drag to your destination. -
Can I use a firewire to thunderbolt cable and Migration Assistant to transfer files from an eMac to the soon ( I hope ) to be released iMac?
Agrred, if the eMac is in Target mode.
Maybe you are looking for
-
Impact of Addition of New Value Fields in the existing Op. Concern-COPA
Hi All, Want to know the steps of adding new value fields in the existing operating concern in COPA? What is the overall impact of addition of New Value fields in the running Operating Concern? How do we test the addition of new value fields? Is the
-
User defined message search on Archived messages in PI 7.31
Hello Experts, We are using XMLDAS to archive the messages of the adapter engine into a file system. User defined search is working fine for the messages in the database, based on the UDMS criteria, in database tab of message monitoring. And as per S
-
How to insert records in database from a dataset with multiple tables
Hi, I'm struggling with the following problem: I have saved a dataset to an XML file by executing the following statement: ds.WriteXml( "Export\\ModuleChain_Mdata.xml" );The dataset, ds, includes records from several tables. Is there an easy way t
-
Triggering keyDown while commandDown in OSX
I use the keyDown event to trigger various conventional keyboard shortcuts such as ctrl-c to copy, ctrl-v to paste. The problem is that in OSX the command key blocks the keyDown event in Director so instead of the OSX convention of command-c I have t
-
How to invoke a stored procedure from SubmitEditForm.jsp
Instead of directly inserting or updating the data I would like to invoked the stored procedure. Has anybody done this?