Copying file names from a folder into excel?
I have a folder with over 200 files.
I would like to copy the information/file names of these files into an excel spread sheet.
I don't need to get all other extensions and information just the file names.
Is there a way to do this?
Open the folder,
Select All,
Copy,
Open Excel and select a cell
Paste.
Similar Messages
-
How to upload all excel files data from one folder into internal table.
Dear All,
I have one requirement, It is like I want to upload the frontend file data into my internal table, But here my scenario is;
If I have one folder ( Called : Temp) in my frontend system, in this folder ( Called : Temp) I have 100 excel files. In each excel file I have some 1000u2019s of entries. All these data of every file I want to take into my internal table.
If I have one file I can go for, CALL METHOD cl_gui_frontend_services=>file_open_dialog and then upload method to upload. But I want to take all these excel files from that folder at a time, is there any class or any thing is there..? plz help..
Thanks...
Edited by: satishsuri on Jan 11, 2011 9:33 AMHi satishsuri ,
You will have to use 3 methods together :
CALL METHOD cl_gui_frontend_services=>directory_browse "Browse the Directory
CALL METHOD cl_gui_frontend_services=>directory_list_files "Get all the files from the directory
CALL METHOD cl_gui_frontend_services=>gui_upload "Upload each file in a loop
Example:
TYPES: BEGIN OF ty_data,
line TYPE string,
END OF ty_data.
DATA: str_file TYPE string,
str_dir TYPE string,
it_file_table TYPE STANDARD TABLE OF file_info,
wa_file_table TYPE file_info,
v_count TYPE i,
it_data TYPE STANDARD TABLE OF ty_data,
wa_data TYPE ty_data.
CALL METHOD cl_gui_frontend_services=>directory_browse
CHANGING
selected_folder = str_dir.
CALL METHOD cl_gui_frontend_services=>directory_list_files
EXPORTING
directory = str_dir
CHANGING
file_table = it_file_table
count = v_count.
LOOP AT it_file_table INTO wa_file_table.
CONCATENATE str_dir wa_file_table-filename INTO str_file SEPARATED BY '\'.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = str_file
filetype = 'ASC'
CHANGING
data_tab = it_data.
LOOP AT it_data INTO wa_data.
WRITE : / wa_data-line.
ENDLOOP.
ULINE.
ENDLOOP.
Regards,
Jovito -
Can I use file names from some folder to specisfly a value of a variable
so here is the thing I want to do:
I've got like 3 variables in my swf file which value tells to
the code how many picture there are to load.
So I have like
var totalPics:Number = 5
in my folder images I have 5 pics, but I want to put 3 more
so I want to make suck code that will check the total files in the
folder and return a value of 8 or check the name of the last file
found in the foulder like pic8.swf (I've made it into swf to load
in a loader) and to take that letter 8 from it as a value to put in
the variable totalPics so it is = 8.
Can u tell me is this possible to make in flash.... where I
should read helps or guides .. or just give me a simple example
please.
Thank u a lot. If u have any more questions, just ask me..Very helpful of you guys ;] Thanks a lot.. so lets continue
on the matter..
GWD the second option is good but can work in a simplier
code.. mine is a bit complexed and by that I mean.. that the total
number of pics or things to load should be known for the main swf
file at his start. That is because before the turn for the pics to
load comes, there is something else that must happen first, and it
depends on that total number (actually 3 total numbers cuz there
are 3 folders with different pics that must mix) So.. can't use the
second option cuz it works good when the code is a bit more simple
than that.
If u didn't understand whant I tried to explain.. doesn't
matter.. not so important atm.
Now the thing with the LoadVars.. yes, I've been thinking the
same thing but like this: At the 1st frame in the main timeline I
have 3 variables that are used further in the code and that must be
predefined by how many pics there actually are, so.. I've been
thining to make 3 different var1.txt, var2.txt and var3.txt files
for example and to put there as value just the number I need. So
when I add more pics for example to my images folder, I edit the
txt file containing their total number and just change it so the
code can automatically add the new pics to the sequence.
I've got some examples of this how LoadVars works with txt
files and I think I can manage to do that, but anyway would be nice
of you to give me some example ;] and of course correct me if my
toughts above are not true.
Now.. SumTsb.. what u mentioned, I am interested in, because
I have a PHP guy, who can make me a code that automatically counts
and gives back the totalPics number from a certain folder (I don't
know for sure that it is possible but if it is he can do it). My
point is.. When he makes this code.. that reterns value of
totalPics, how can I redirect it so it changes the value of
totalPics inside my main swf file. I see only this as option at the
moment:
1) when someone adds or deletes files from the folder the php
code returns a different value, equal to the number of files in the
folder, and automatically changes the content of the file var1.txt
like this:
First off var1.txt has: &content=10 // this is the total
number of pics/swf files in the folder;
when u add.. like 3 more files.. the php code changes the
value inside of var1.txt to: &content=13 and when the main swf
is started he takes the new value and my problem is solved. Is this
what I say as example true ? If it is I guess the only thing left
for me is the php programer to make his code and job is done.
But answer me this question too: is it possible the php code
to return the value of the totalPics directly into the main swf
file. So if I have inside the main swf a variable at the first
frame ot the main timeline called totalPics, can the php give it a
value equal to the total numbers of files in a folder, and how ?
I guess I've written too too much :D so I'll wait what u will
answer me now.. I think you understood my idea.. and if more
questions arise I will write u back. And if no.. I will just thank
you a lot :D -
Export File Names from a Folder to a Database Program
Ok, so this one probably fairly simple, I just cant seem to figure out how to do it. I have a folder containing over 200 file names. It is my wish to figure out a way to import all the file names (just the names) into a document, preferably an MS excel doc. I assume their is a way to do this with auditor maybe, but I am not sure. Any one know how to do this.
Thanks for your help in advanceHi, Tim. This should do it for you:
http://www.corieslate.com/projects/filelister/index.html -
How to get the file name from downloads folder with the applescript??
Hi All..
I am downloading an application to downloads folder, I need to install the same application after downloading programatically.
So how do I get the filename in runtime while downloading or after downloading from downloads folder with Applescript or Java?
Also my download URL link doesnot contain full name of the download file.
Pls suggest.Hi,
The best method is to use curl.
Other methods are not reliable, but can work, it depends on several factors (what the script does, what the user does).
Here is an example with the curl command:
set tUrl to "http://sourceforge.net/projects/vlc/files/2.0.4/macosx/vlc-2.0.4.dmg/download?ac cel_key=60%3A1350656196%3Ahttp%253A//www.videolan.org/vlc/download-macosx.html%3 A7233e4e9%245818d66f39b0576e1e9c4a0f3b46b1991180bfdd&click_id=976a88ee-19f7-11e2 -9a21-0200ac1d1d8e&source=accel"
set dFolder to path to downloads folder
tell application "Finder" to set newFolder to (make new folder at dFolder) as string
set f to quoted form of POSIX path of newFolder
do shell script "cd " & f & " && curl -L " & tUrl & " -o 'vlc.dmg'" -- download to file "vlc.dmg"
set downloadedFile to newFolder & "vlc.dmg" --<-- HFS path
--do something with the downloadedFile -
Forms 6i, copy file to from A folder to B folder in client side
I am using forms 6i, I want to write a procedure that will copy an file located in A Folder to B folder in client work-station....how to do that....
Thanks !Hi,
If you are using C/S, then you can use the HOST command to do that. If you are using WebForms, then you need to do that using some Java Bean. Also, you can search this forum for d2kwutil.pll, which has similar functionality of HOST command but in the client machine.
HTH.
Regards,
Arun -
Extracting file name from directory folder (~cont)
what if I want to retrieve indiviual files of a certain file type...e.g. *.jsp file type, from a directory folder??
You can implement a FileFilter, then use the listFiles method of the File class to return the related files:
import java.io*;
public class JspFileFilter implements FileFilter {
public boolean accept(File pathname) {
return (pathname.getName().endsWith(".jsp"));
public static void main(String[] args) {
File directory = new File("c:/web");
File[] jspFiles = directory.listFiles(new JspFileFilter());
for (int i=0;i<jspFiles.length;i++) {
System.out.println(jspFiles[ i ].getName());
} -
Extracting file name from directory folder
Hi,
I need to loop a folder to retrieve out individual files.
Is there any way to do it??
Thank You!
Michelleimport java.io.File;
File dir = new File("your directory name");
File[] files = dir.listFiles();
for (k=0; k < files.length; k++) {
File currFile = files[k];
do something
} -
Copy File name and Date only from a Folder with SSIS
Hello all,
I need to create a package which will list the file names and the dates in a folder, these files are blank flat files. After extracting the file names from the file path i need to create a table which will have two columns Filename and
Date.We get about 1000 such files every month and we are looking to maintain them in a table.
Is this possible? Can someone point me in the right direction?
FMArthur , I actually figured it out. The For each container let me pass thru the file name, then I inserted the file name into my staging table. I created a FilePath variable and basically Did a sql task and
INSERT INTO MyTable
SELECT Filename = ?,
LoadDate = GetDate()
In my for each loop I added a *.*txt qualifier... I`ve tested and works well... Got what I needed.
FM -
Images I move from one folder into another are disappearing, at first it was occurring immediately and only if I did not copy and paste the images. Today however I found out that images I had been using for days just up and vanished from their new location. A few of these images had copies in another folder that remained and the ones I couldn't find may or may not have ever had copies. I had backed up my system with time machine recently as well, so I went into the backup to retreive the lost images. When I searched and found the backup copies I got the error "the file alias cannot be opened because the original cannot be located". The crazy thing is that the images that remained on my computer did not give me the same error and opened like they should.
In short images that I am creating, saving, and using are disapearing so epically that even time machine versions are affected when retrieval is attempted. Any suggestions as to what I could be doing wrong without realizing it? Or perhaps other people have had similar bugs that are software related and have a solution?Hi Kevin,
I understand what you tried to do but it doesn't work that way. Swapping drive names will just mess things up.
You should be able to reconnect the files though: in the Locate Referenced Files dialog make sure you click the Show Reconnect Options button — this will give you access to all the connected drives. Locate one of the files and hit Reconnect All. Should do the trick.
Best -
Flat file name from Sender Side Dynamically into subject of Receiver Mail
Hi All,
I am Using a file to Mail Scenario, My requirement is to get dynamically the file name from flat file of the Sender Side into Subject of Receiver Mail Adapter and attachment of file from the Sender Side. Can anyone help me out.
Thanks in AdvanceHi....
You can write udf in the message mapping to get the Dynamic file name and map that to the subject of the receiver mail.
DynamicConfiguration conf = (DynamicConfiguration) param.get(
StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey KEY_FILENAME = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
// read value
String Filename = conf.get(KEY_FILENAME);
Regards,
Leela -
Offline Folder can not chaange the letter of a file name from capital to lowercase
Dear Expert,
we deploy the offline folder to end users, there is a strange issue happened now, if user tries to change the letter of a file name from capital to lowercase, the system will show "You need permission to perform this aciton". But other actions
are fine, like, create, delete, rename, etc.Hi,
Please check if the offline folder is made available offline to end users. The Offline Files feature uses the client-side cache (CSC) database. When the files are made available offline, the CSC database prevents users from changing the case of file
names.
For more detailed information, please refer to the article below:
You cannot rename files by using different case when the files are made available offline in Windows Vista or in Windows 7
http://support.microsoft.com/kb/953945/en-us
Best Regards,
Mandy
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
How to get the target file name from an URL?
Hi there,
I am trying to download data from an URL and save the content in a file that have the same name as the file on the server. In some way, what I want to do is pretty similar to what you can do when you do a right click on a link in Internet Explorer (or any other web browser) and choose "save target as".
If the URL is a direct link to the file (for example: http://java.sun.com/images/e8_java_logo_red.jpg ), I do not have any problem:
URL url = new URL("http://java.sun.com/images/e8_java_logo_red.jpg");
System.out.println("Opening connection to " + url + "...");
// Copy resource to local file
InputStream is = url.openStream();
FileOutputStream fos=null;
String fileName = null;
StringTokenizer st=new StringTokenizer(url.getFile(), "/");
while (st.hasMoreTokens())
fileName=st.nextToken();
System.out.println("The file name will be: " + fileName);
File localFile= new File(System.getProperty("user.dir"), fileName);
fos = new FileOutputStream(localFile);
try {
byte[] buf = new byte[1024];
int i = 0;
while ((i = is.read(buf)) != -1) {
fos.write(buf, 0, i);
} catch (Throwable e) {
e.printStackTrace();
} finally {
if (is != null)
is.close();
if (fos != null)
fos.close();
}Everything is fine, the file name I get is "e8_java_logo_red.jpg", which is what I expect to get.
However, if the URL is an indirect link to the file (for example: http://javadl.sun.com/webapps/download/AutoDL?BundleId=37719 , which link to a file named JavaSetup6u18-rv.exe ), the similar code return AutoDL?BundleId=37719 as file name, when I would like to have JavaSetup6u18-rv.exe .
URL url = new URL("http://javadl.sun.com/webapps/download/AutoDL?BundleId=37719");
System.out.println("Opening connection to " + url + "...");
// Copy resource to local file
InputStream is = url.openStream();
FileOutputStream fos=null;
String fileName = null;
StringTokenizer st=new StringTokenizer(url.getFile(), "/");
while (st.hasMoreTokens())
fileName=st.nextToken();
System.out.println("The file name will be: " + fileName);
File localFile= new File(System.getProperty("user.dir"), fileName);
fos = new FileOutputStream(localFile);
try {
byte[] buf = new byte[1024];
int i = 0;
while ((i = is.read(buf)) != -1) {
fos.write(buf, 0, i);
} catch (Throwable e) {
e.printStackTrace();
} finally {
if (is != null)
is.close();
if (fos != null)
fos.close();
}Do you know how I can do that.
Thanks for your help
// JB
Edited by: jb-from-sydney on Feb 9, 2010 10:37 PMThanks for your answer.
By following your idea, I found out that one of the header ( content-disposition ) can contain the name to be used if the file is downloaded. Here is the full code that allow you to download locally a file on the Internet:
* Download locally a file from a given URL.
* @param url - the url.
* @param destinationFolder - The destination folder.
* @return the file
* @throws IOException Signals that an I/O exception has occurred.
public static final File downloadFile(URL url, File destinationFolder) throws IOException {
URLConnection urlC = url.openConnection();
InputStream is = urlC.getInputStream();
FileOutputStream fos = null;
String fileName = getFileName(urlC);
destinationFolder.mkdirs();
File localFile = new File(destinationFolder, fileName);
fos = new FileOutputStream(localFile);
try {
byte[] buf = new byte[1024];
int i = 0;
while ((i = is.read(buf)) != -1) {
fos.write(buf, 0, i);
} finally {
if (is != null)
is.close();
if (fos != null)
fos.close();
return localFile;
* Returns the file name associated to an url connection.<br />
* The result is not a path but just a file name.
* @param urlC - the url connection
* @return the file name
* @throws IOException Signals that an I/O exception has occurred.
private static final String getFileName(URLConnection urlC) throws IOException {
String fileName = null;
String contentDisposition = urlC.getHeaderField("content-disposition");
if (contentDisposition != null) {
fileName = extractFileNameFromContentDisposition(contentDisposition);
// if the file name cannot be extracted from the content-disposition
// header, using the url.getFilename() method
if (fileName == null) {
StringTokenizer st = new StringTokenizer(urlC.getURL().getFile(), "/");
while (st.hasMoreTokens())
fileName = st.nextToken();
return fileName;
* Extract the file name from the content disposition header.
* <p>
* See <a
* href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html">http:
* //www.w3.org/Protocols/rfc2616/rfc2616-sec19.html</a> for detailled
* information regarding the headers in HTML.
* @param contentDisposition - the content-disposition header. Cannot be
* <code>null>/code>.
* @return the file name, or <code>null</code> if the content-disposition
* header does not contain the filename attribute.
private static final String extractFileNameFromContentDisposition(
String contentDisposition) {
String[] attributes = contentDisposition.split(";");
for (String a : attributes) {
if (a.toLowerCase().contains("filename")) {
// The attribute is the file name. The filename is between
// quotes.
return a.substring(a.indexOf('\"') + 1, a.lastIndexOf('\"'));
// not found
return null;
} -
I'm getting this error message: "User not registered for online use" when i'm trying to download music/ track names from a CD into ITunes on my Windows 8 PC. I'm registered and my itunes account/ appleID are all correct and working.
The ""not recognized for on-line use". error is associated with the Gracenote service that iTunes uses to look up and retrieve metadata for CDs. Some users have reported that this error occurs when trying to import from CD, subsequent to upgrading to version 12. A number of slightly different solutions have been reported (though all of a similar nature).
Try walking through the following steps - before starting you may have to enable hidden files and folders to be viewed - in Windows 7 / Windows Explorer select Organize > Folder and search options, then on the View tab make sure that Show hidden files, folders and drives is selected. Without this you won't see the AppData folder in C:\Users\username\
Exit iTunes
In Windows Explorer, go to the folder C:\Users\username\AppData\Roaming\Apple Computer\iTunes
Delete the following files:
CD Info.cidb
com.apple.iTunes.Gracenote.plist
Restart iTunes
Insert a CD and see if details are now correctly retrieved from Gracenote
If this doesn't work:
In iTunes, select Edit > Preferences and make a note (or take a screenshot) of your preferences settings in all relevant tabs
Exit iTunes
In Windows Explorer, go to the folder C:\Users\username\AppData\Roaming\Apple Computer\iTunes
Delete the following file:iTunesPrefs.xml
Restart iTunes
Insert a CD and see if details are now correctly retrieved from Gracenote
If this second procedure does work, you'll need to restore other iTunes preferences settings to those that you noted in step 1.
If this one didn't work:
Exit iTunes
Check the following folders:
C:\Users\username\AppData\Local\Apple Computer\iTunes
C:\Users\username\AppData\LocalLow\Apple Computer\iTunes
Delete any copies of the following files:
CD Info.cidb
com.apple.iTunes.Gracenote.plist
iTunesPrefs.xml
Restart iTunes
Insert a CD and see if details are now correctly retrieved from Gracenote
Again, if this procedure does work, you'll need to restore other iTunes preferences settings to those that you noted in step 1 of the second procedure. If you're still not able to retrieve CD info:
Exit iTunes
In Windows, select Start > Control Panel > Programs and Features. Find the entry for iTunes, right-click and select Repair.
When this process has finished, restart iTunes
Insert a CD and see if details are now correctly retrieved from Gracenote
If none of these have worked (and almost everything I've seen suggests you should be OK by this point), you may have an issue with the installation and configuration of iTunes itself. If you have got this far, see turingtest2's notes on Troubleshooting issues with iTunes for Windows updates for advice on how to remove and replace of all components of iTunes. -
Hi All,
I have a parameter.This calls the function
"CALL FUNCTION 'F4_FILENAME' to get the file from C drive.
After selecting the file the path is displayed in the Parameter field.
My problem is I need to extract only file name from the path.Please advice.
Example : Prameter id C:\folder\file.xls
I shd extract only file.xls from the path.Please advice.Hi,
Use the below logic:
data: begin of itab,
val type char20,
end of itab.
SPLIT l_f_path AT '\' INTO TABLE itab.
The last record of the internal table holds the file name.
describe table itab lines l_f_lines.
read itab index l_f_lines.
l_f_filaname = itab-val.
Hope this helps u.
Maybe you are looking for
-
JDK1.2.2 and untrusted server chain and HELP
Hi, I'm using JDK1.2.2 and I've downloaded and installed JSSE1.02. I have also installed the server cert in my own truststore. The server to whom I want to connect sends two certificates. One is valid and this is the one I need and I have and one tha
-
How to use UTL_SMTP to send email with existing file attachment
Hello! I am trying to create a pl/sql procedure that lets me send an email and include an existing file to a email address. So far, I found information on how to send a file and create an attachment with information I put in the procedure. This is NO
-
IPod nano 3rd Gen 8G "Device Not Recognized" on 2 diffrent computers...
I have the latest versions of iTunes on both a Windows XP service pack 3 computer and Windows 7 Laptop. I've tried multiple cords but both computers tell me "device not recognized", I've uninstalled and reinstalled all drivers. Done a reset and Disk
-
I've just spent the last 6 hours preparing a report in Pages 09 and when I went to save the document pages crashed! When I reopened the document in Pages it had reverted to an earlier saved version. How do I recover the lost work? I normally use Micr
-
Deleting from 2 different tables
HI, i have a Database with 2 tables that are identical. products (main product table) products_update (every morning this one is fill automatically with the list of products) So i need to insert/update/delete the products add and update works fine <c