Filtering a file list by both filename and filesize
For instance, I would like to do some processing on only text files under 2 megabytes. The text filter is easy enough, but it's the file size filter that's getting me. What I have so far is this:
FilenameFilter filter = new FilenameFilter() {
public boolean accept(File dir, String name) {
name=name.toLowerCase();
return ((name.endsWith(".txt")));
String[] getList = getFile.list(filter);Any help would be appreciated.
come on now. this was easy
return name.endsWith(".txt") && file.length() -----??------;
Similar Messages
-
Not option for Transport under the tab Change list in both IR and ID
Hello All,
The option transport is missing in tab change list for both IR and ID. We have created the track, maintained the systems in the NWDI but still no luck. We have also included the SC SAP-INTDIR 3.0 for both the tracks (i.e.) IR and ID. Also we are running a seperate NWDI server for CMS and the SLD is with the XI production server.
Am I missing any configuration? Kindly suggest
Regards,
AnandHi Anand
Please check if the following link is of some good to you:
http://help.sap.com/saphelp_nw70/helpdata/EN/45/f9f02cf3e41ecce10000000a1553f7/frameset.htm
Also check for steps mentioned here:
http://www.saptechies.com/minisap-610-installation/
I hope it helps
Regards
Chen -
Nautilus NFS shares listed under both Devices and Network
I have several NFS shares from my home server that I mount using fstab. I am running a fully up to date installation of Gnome 3.12. However, as my subject indicates, my NFS shares appear under both Devices and Network in Nautilus. I've done some searching and not found much about this. It is redundant and most importantly space wasting to have two lists of the same entries. Is there a way I can eliminate this duplication? Thanks.
Here is what I'm using in fstab to mount the shares:
nfs noauto,x-systemd.automount,x-systemd.device-timeout=10,rw,rsize=32768,wsize=32768,timeo=14,hard,intr,user 0 0I indicated that I was trying to mount several NFS shares off my home server. I should have mentioned that these are NOT NFSv4 shares. Originally, I had the mount points inside my home folder. I've since moved them in the /mnt directory and don't have duplicate entries. Well, I don't have any entries under either Network or Devices. I've made links to the directories where the NFS shares are mounted. I was more curious if this was a bug with Nautilus or my own error as having the mount points in my home directory with other file browsers such as Dolphin in KDE did not yield duplicate entries with the same fstab mount options.
I guess the long and short of it is that if you are using Nautilus, have your NFS mount points outside your home folder.
Thanks. -
File Scenario with Dynamice Filename and Directory
Hi All,
we have a requirement that PI has to pickup the file from 2 FTP Server.
First PI has to pickup an XML file from Server1 , this XML file has a details about the Filename and Directory of the second FTP server., then PI should login to the server2 and pickup the file form the directory.
Regards,
ManiHi Mani,
Can you try below approach ,
Read file 1 from Server 1 using sender file Communication channel and read 2nd filename and directory details and pass these values to UDF/Java mapping to log in to server 2 and retrieve the data/file2 ?
Thanks
Hari. -
How to generate complete file list of hard drive and output to text file
I need to start backing things up to drives, which over time will be put in storage.
I would like to be able to create a complete file index and folder tree of every drive and have it output to a text file so that in the event I ever need to go back to a drive, I can search the text file to know what drive to pull from storage (rather than using spotlight to search through 25 drives).
Is there any way to do this with either OS X or with a third party software? Ideally, text file and not PDF.
Thanks!You can use the terminal.app with the following command:
rsync -rlptn --stats --progress +Source.. Destination..+
example with actual output:
rsync -rlptn --stats --progress /Volumes/Mac\ Data/websites /Volumes/EXT\ SATA2building file list ...
146 files to consider
websites/
websites/.DS_Store
websites/bestelectricbill.com/
websites/bestelectricbill.com/.DS_Store
websites/bestelectricbill.com/211299c1
websites/bestelectricbill.com/awards.php
websites/bestelectricbill.com/careers.php
websites/bestelectricbill.com/category1.php
websites/bestelectricbill.com/category2.php
websites/bestelectricbill.com/category3.php
websites/bestelectricbill.com/checkout.php
websites/bestelectricbill.com/company.php
websites/bestelectricbill.com/contactus.php
websites/bestelectricbill.com/email.js
websites/bestelectricbill.com/faqs.php
websites/bestelectricbill.com/fsp.js
websites/bestelectricbill.com/history.php
websites/bestelectricbill.com/index.php
websites/bestelectricbill.com/index_copy.php
websites/bestelectricbill.com/investors.php
websites/bestelectricbill.com/job1.php
websites/bestelectricbill.com/job2.php
websites/bestelectricbill.com/job3.php
websites/bestelectricbill.com/job4.php
websites/bestelectricbill.com/job5.php
websites/bestelectricbill.com/managementteam.php
websites/bestelectricbill.com/news1.php
websites/bestelectricbill.com/news2.php
websites/bestelectricbill.com/news3.php
websites/bestelectricbill.com/news4.php
websites/bestelectricbill.com/news5.php
websites/bestelectricbill.com/newsandevents.php
websites/bestelectricbill.com/partners.php
websites/bestelectricbill.com/press.php
websites/bestelectricbill.com/privacypolicy.php
websites/bestelectricbill.com/product1a.php
websites/bestelectricbill.com/product1a1.php
websites/bestelectricbill.com/product1a2.php
websites/bestelectricbill.com/product1b.php
websites/bestelectricbill.com/product1b1.php
websites/bestelectricbill.com/product1b2.php
websites/bestelectricbill.com/product1c.php
websites/bestelectricbill.com/product1c1.php
websites/bestelectricbill.com/product1c2.php
websites/bestelectricbill.com/product1d.php
websites/bestelectricbill.com/product1d1.php
websites/bestelectricbill.com/product1d2.php
websites/bestelectricbill.com/product1e.php
websites/bestelectricbill.com/product1e1.php
websites/bestelectricbill.com/product1e2.php
websites/bestelectricbill.com/products.php
websites/bestelectricbill.com/productsearch.php
websites/bestelectricbill.com/registration.php
websites/bestelectricbill.com/search.php
websites/bestelectricbill.com/searchresults.php
websites/bestelectricbill.com/service1.php
websites/bestelectricbill.com/service1a.php
websites/bestelectricbill.com/service1a1.php
websites/bestelectricbill.com/service1a2.php
websites/bestelectricbill.com/service1b.php
websites/bestelectricbill.com/service1b1.php
websites/bestelectricbill.com/service1b2.php
websites/bestelectricbill.com/service1c.php
websites/bestelectricbill.com/service1c1.php
websites/bestelectricbill.com/service1c2.php
websites/bestelectricbill.com/service1d.php
websites/bestelectricbill.com/service1d1.php
websites/bestelectricbill.com/service1d2.php
websites/bestelectricbill.com/service1e.php
websites/bestelectricbill.com/service1e1.php
websites/bestelectricbill.com/service1e2.php
websites/bestelectricbill.com/service2.php
websites/bestelectricbill.com/service3.php
websites/bestelectricbill.com/services.php
websites/bestelectricbill.com/shoppingcart.php
websites/bestelectricbill.com/sitemap.php
websites/bestelectricbill.com/story1.php
websites/bestelectricbill.com/story2.php
websites/bestelectricbill.com/story3.php
websites/bestelectricbill.com/termsofuse.php
websites/bestelectricbill.com/Templates/
websites/bestelectricbill.com/Templates/siteassist_config.cfg
websites/bestelectricbill.com/Templates/siteassist_template.dwt.php
websites/bestelectricbill.com/Templates/_notes/
websites/bestelectricbill.com/Templates/_notes/dwsync.xml
websites/bestelectricbill.com/_notes/
websites/bestelectricbill.com/_notes/dwsync.xml
websites/bestelectricbill.com/images/
websites/bestelectricbill.com/images/.DS_Store
websites/bestelectricbill.com/images/app_img17.jpg
websites/bestelectricbill.com/images/bestelectriclogo.jpg
websites/bestelectricbill.com/images/bestelectriclogo.jpg.ori.jpg
websites/bestelectricbill.com/images/btn_saveBusiness.jpg
websites/bestelectricbill.com/images/btn_saveHome.jpg
websites/bestelectricbill.com/images/imgAbout_OverviewTeam copy.jpg
websites/bestelectricbill.com/images/imgCollage.jpg
websites/bestelectricbill.com/images/imgComp1.jpg
websites/bestelectricbill.com/images/imgComp3.jpg
websites/bestelectricbill.com/images/imgComp4.jpg
websites/bestelectricbill.com/images/imgComp5.jpg
websites/bestelectricbill.com/images/imgComp6.jpg
websites/bestelectricbill.com/images/imgComp7.jpg
websites/bestelectricbill.com/images/imgComp8.jpg
websites/bestelectricbill.com/images/phone number.jpg
websites/bestelectricbill.com/images/phone number2.jpg
websites/bestelectricbill.com/images/_notes/
websites/bestelectricbill.com/images/_notes/dwsync.xml
websites/bestelectricbill.com/siteassist_css/
websites/bestelectricbill.com/siteassist_css/color.css
websites/bestelectricbill.com/siteassistcss/mystyles.css
websites/bestelectricbill.com/siteassist_css/navigation.css
websites/bestelectricbill.com/siteassistcss/navigationcolor.css
websites/bestelectricbill.com/siteassist_css/style.css
websites/bestelectricbill.com/siteassist_css/template.css
websites/bestelectricbill.com/siteassistcss/notes/
websites/bestelectricbill.com/siteassistcss/notes/dwsync.xml
websites/bestelectricbill.com/siteassist_images/
websites/bestelectricbill.com/siteassistimages/above_topnavbackground.jpg
websites/bestelectricbill.com/siteassistimages/below_topnavbackground.jpg
websites/bestelectricbill.com/siteassist_images/border.gif
websites/bestelectricbill.com/siteassistimages/bottombackground.jpg
websites/bestelectricbill.com/siteassistimages/brcorner.jpg
websites/bestelectricbill.com/siteassist_images/bubbles.jpg
websites/bestelectricbill.com/siteassistimages/dottedhorizontal.jpg
websites/bestelectricbill.com/siteassistimages/dottedvertical.jpg
websites/bestelectricbill.com/siteassistimages/home_mainbackground.jpg
websites/bestelectricbill.com/siteassistimages/img100x125.gif
websites/bestelectricbill.com/siteassistimages/img160x110.gif
websites/bestelectricbill.com/siteassistimages/img400x197.gif
websites/bestelectricbill.com/siteassistimages/img463x170.gif
websites/bestelectricbill.com/siteassistimages/loginbtn.gif
websites/bestelectricbill.com/siteassistimages/logotraditional.jpg
websites/bestelectricbill.com/siteassistimages/mainfeature.jpg
websites/bestelectricbill.com/siteassistimages/side_navcell.gif
websites/bestelectricbill.com/siteassistimages/side_nav_cellsel.gif
websites/bestelectricbill.com/siteassistimages/side_nav_opengrad.gif
websites/bestelectricbill.com/siteassistimages/side_nav_open_selgrad.gif
websites/bestelectricbill.com/siteassistimages/sidenavbackground.jpg
websites/bestelectricbill.com/siteassist_images/spacer.gif
websites/bestelectricbill.com/siteassistimages/topbackground.jpg
websites/bestelectricbill.com/siteassistimages/topnavbackground.jpg
websites/bestelectricbill.com/siteassistimages/topnav_cellbg.gif
websites/bestelectricbill.com/siteassistimages/topnav_cell_bghover.gif
websites/bestelectricbill.com/siteassistimages/trcorner.jpg
websites/bestelectricbill.com/siteassistimages/notes/
websites/bestelectricbill.com/siteassistimages/notes/dwsync.xml
Number of files: 146
Number of files transferred: 135
Total file size: 1150921 bytes
Total transferred file size: 1150921 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 2825
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 3717
Total bytes received: 896
sent 3717 bytes received 896 bytes 9226.00 bytes/sec
total size is 1150921 speedup is 249.50
Simply copy and and paste output text in terminal to a text file.
What I actually did there was use the "dry run option" (-n) - no files were actually transferred.
For more info on the rsync command type and run "man rsync" at the terminal command line.
Also see this webpage:
http://www.ss64.com/osx/rsync.html
Kj -
My SD card reader has caused my iPhoto screen to be locked with no list of files on the lefthand side and a blank main photo area apart from the rotating download icon operating in the centre of the photo part of the screen.
I have tried to quit iphoto but when I restart it the same locked screen appears.
I believe I caused this problem when I removed my SD device without first ejecting it when the blank screen appeared without downloading my new photos.
Can anyone help a 66 year old computer illiterate fool ?.
RegardsUse Force Quit (under the Apple menu at the top) to close iPhoto. Then try opening it again. If it locks up again force quit and try this: launch iPhoto with the Option key held down and create a new, test library. Import some photos and check to see if the same problem persists.
If the problem does not persist try the following: make a temporary, backup copy (select the library and type Command+D) and apply the two fixes below in order as needed:
Fix #1
Launch iPhoto with the Command+Option keys held down and rebuild the library.
Since only one option can be run at a time start with Option #1, followed by #3 and then #4 as needed.
Fix #2
Using iPhoto Library Manager to Rebuild Your iPhoto Library
Download iPhoto Library Manager and launch.
Click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option
In the next window name the new library and select the location you want it to be placed.
Click on the Create button.
Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments but not books, calendars or slideshows. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
If the problem persists in the test library do the following: make a temporary, backup copy (if you don't already have a backup copy) of the library and try the following:
1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
User/Home()/Library/ Preferences folder.
2 - delete iPhoto's cache file, Cache.db, that is located in your
User/Home()/Library/Caches/com.apple.iPhoto folder.
Click to view full size
3 - launch iPhoto and try again.
NOTE: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding down the Option key when launching iPhoto. You'll also have to reset the iPhoto's various preferences.
OT -
Weird issues with file share using both SMB and AFP?
I use my Xserve with 10.4 server primarily as a file server (with a huge RAID array attached via Ultra320 SCSI). I've served files from this server over SMB ("Windows" sharing) to both PCs and Macs for a few years now with no big issues. The files are being shared in a collaborative environment with extensive user accounts and ACLs set up.
I would like to turn on AFP for these same file shares, so those accessing with a Mac can have the added benefits of AFP over SMB. However, I've heard some rumors of some complicated issues developing from the use of both AFP and SMB together on the same folders, in a mixed environment.
The rumors I've heard are things that would happen rarely but enough for it to be significant. For example, a file created over SMB and then edited over AFP would have some problems being re-edited over SMB again, due to some complicated feature that the rumor is unable to explain (something with a resource fork or file locking?). Maybe something weird that just involves the Adobe Creative Suite?
Anyway, I figured I'd throw this out there. Anyone who serves files over both protocols to a varied set of computers and applications having weird issues? Or is everything working for you? Thanks in advance.
Message was edited by: dtempThanks for the responses!
re:crop
It's coming in as cropped with no way to fix it that I can see.
Pressing space or opening in preview shows the full image but if it gets anywhere near Photoshop it comes in auto-cropped.
I'm starting to this it's a bug and will be reporting it to Adobe. -
Why do my iTunes U files sync to BOTH "Music" and "iTunes U" on my i phone?
Syncing to a clean (restored) iPhone, when I sync my "iTunes U" files they are sent to both "iTunes U" and Music on my iPhone. In iTunes it shows the files in "iTunes U", but NOT in the Music section, even though they have actually been put in Music as well as "iTunes U" on the iPhone itself. Could someone please tell me how to keep this duplication from happening ?? Thanks !!!
This is the same problem with video being duplicated in the movies section. A related forum here:
http://discussions.apple.com/click.jspa?searchID=-1&messageID=10643632 -
Audio files saved as both mp3 and wav
I'm using CS5.5 and suddenly when I save a file as an .mp3 it will also make .wav copies of the file, and since at this radio station we conserve space by only recording at 320Kbps .mp3, wav files are just too big. Is there a setting I can change to save only to the .mp3 that I have chosen?
Can you please describe exactly how you're doing this? FWIW, I'm not aware of any way that Audition can do this unaided...
-
Incorrect Aperture listed in both Overview and Specs of the Canon EOS 7D at BB
Hi all,
I'm going to be buying this camera, so I was looking things over pretty closely. I know that larger aperture lenses are generally more expensive and so was surprised that the cost difference for a body only 7D and a body with lens7D was only $200, especially since the lense in questioin supposedly has an aperture range of f/2.8-f/5.6. When I enlarged the photo of the 7D, I saw quite clearly marked on the lens that the aperture was f/3.5-f/5.6. I would suggest that Best Buy gets their text changed before they have a bunch of angry customers on their hands. I will still buy the camera with this lense, but I have to say I would have been very upset if I thought I was getting a 2.8 aperture lens and was delivered a 3.5 aperture one instead.Hi Titania,
I have to say thanks for making us aware of this! You are correct that the specifications say the lens that comes with this camera body has a variable aperture of f/2.8-f/5.6, but the lens attached to the camera in the image shows that it has a variable aperture of f/3.5-f/5.6. Either the specifications listed are incorrect or the image doesn't show the lens that actually comes with this camera, and either way we need to update this listing to accurately represent what a customer would get with the purchase of this camera kit.
I have passed along this information to people here at Best Buy® Corporate that can get this update, and I fully expect this to be updated soon. Thanks again!
Thanks for posting,
Allan|Senior Social Media Specialist | Best Buy® Corporate
Private Message -
User_catalog - object listed as both 'TABLE' and 'MATERIALIZED VIEW'
SELECT * FROM USER_CATALOG ORDER BY OBJECT_NAME
returns ...
OBJECT_NAME OBJECT_TYPE
BLOBBY SYNONYM
BONUS TABLE
DEPT TABLE
EMP TABLE
EMPLOYEES SYNONYM
EMPWITHDEPT MATERIALIZED VIEW
EMPWITHDEPT TABLE
^^^^^^^^^^^^Any ideas to show only the 'MATERIALIZED VIEW' row for the above query?
Thanks in advance,
Mike NormanSo, I would need some sort of logic to
check if the OBJECT_NAME from user_objects
is present in user_snapshots print 'MATERIALIZED VIEW'
otherwise take the OBJECT_TYPE from user_objects -
some sort of DECODE? -
How to change the form widths for the EditForm.aspx and NewForm.aspx files that display both new and edited list entries?
Hi ,
According to your description, my understanding is that you want to modify the width of the New Form and Edit Form of a list in SharePoint 2010 .
1.Go to your SharePoint site -> your list.
2.In top ribbon click List tab(List Tools).
3.Towards right you will see option as Form Web Parts, click on it, the three forms will be listed there [New Form, Display Form, Edit Form].
4.Select the one on which you want to increase the width/height.
5.It will open in edit mode, click on Add a Web Part.
6. Click on Forms [Categories] => HTML Form Web Part.
7.After adding the HTML Form Web Part, click on Edit WebPart.
8.Click on Source Editor, Remove all code from it and put an empty HTML table with width and height as per your requirement ex. to increase width
<TABLE WIDTH="800px">
<TR><TD></TD></TR>
</TABLE>
9.Save the form and check out your respective modal by clicking on the same in your list view.
Reference:
http://sharepoint.stackexchange.com/questions/40580/how-to-modify-width-of-standard-dialog-form-sharepoint-2010
Best Regards,
Eric
Eric Tao
TechNet Community Support -
SCSM Report: List report contaning both IR and SR
I want to create an report which contain list of both IR and SR in one report.
Can someone send me query of this.There probably isn't an easy way to do this. While they are both Work Items, they are largely different in their construction, so you would essentially need to pull incidents in one way, and service requests in a different way, and then merge the similar
properties into a common table format.
I'd be glad if someone would correct me on this, however, as this is a common request from my clients that don't have a strong service book definition. as much as I disagree with the underlying assumption that all requests are somehow inherently interchangeable
and should be considered as an amorphous homogeneous mass, that doesn't stop people from wanting it to be true. -
Can we use both INSERT and UPDATE at the same time in JDBC Receiver
Hi All,
I would like to know is it possible to use both INSERT and UPDATE at the same time in one interface because I have a requirement in which I have to perform both the task.
user send the file which contains both new and old record and I need to save those in MS SQL database.
If the record exist then use UPDATE otherwise use INSERT.
I looked on sdn but didn't find any blog which perform both the things at the same time.
Interface Requirement
FILE -
> PI -
> JDBC(INSERT & UPDATE)
I am thinking to use JDBC Lookup but not sure if it good to use for bulk record.
Can somebody please suggest me something or send me the link of any blog or anything to solve this problem.
Thanks,Hi ,
If I have understood properly the scenario properly,you are not performing insert and update together. As you posted
"If the record exist then use UPDATE otherwise use INSERT."
Thus you are performing either an insert or an update which depends on outcome of a search if the records already exist in database or not. Obviously to search the tables you need " select * from ... where ...." query. If your query returns some results you proceed with update since this means there are some old records already in database. If your query returns no rows you proceed with "insert into tablename....." since there are no old records present in database.
Now perhaps the best method to do the searching, taking a decision to insert or update, and finally insert or update operation is to be done by a stored procedure in MS SQL database. A stored procedure is a subroutine available to applications accessing a relational database system. Here the application is PI server. If you need further help on how to write and call stored procedure in MS SQL you can look into these links
http://www.daniweb.com/web-development/databases/ms-sql/threads/146829
http://www.sqlteam.com/article/stored-procedures-parameters-inserts-and-updates
[ This part you can ignore, Since its not sure that you will face this situation
Still you might face some problems while your scenario runs. Lets consider this scenario, after the stored procedure searches the database it found no rows. Thus you proceed with an insert operation. If your database table is being accessed by multiple applications (or users) other than yours then it is very well possible that after the search operation completed with a null result, an insert/update operation has been performed by some other application with the same primary key. Now when you are trying to insert another row with same primary key you get an error message like "duplicate entry not possible for same primary key value". Thus you need to be careful in this respect. MS SQL has a feature called "exclusive locks ". Look into these links for more details on the subject
http://msdn.microsoft.com/en-us/library/aa213039(v=sql.80).aspx
http://www.mssqlcity.com/Articles/Adm/SQL70Locks.htm
http://www.faqs.org/docs/ppbook/r27479.htm
http://msdn.microsoft.com/en-US/library/ms187373.aspx
http://msdn.microsoft.com/en-US/library/ms173763.aspx
http://msdn.microsoft.com/en-us/library/e7z8d5hf(v=vs.80).aspx
http://mssqlserver.wordpress.com/2006/11/08/locks-in-sql/
http://www.mollerus.net/tom/blog/2008/03/using_mssqls_nolock_for_faster_queries.html
There must be other methods to avoid this problem. But the point is you need to be sure that all access to database for insert/update operations are isolated.
regards
Anupam -
List IDoc message tpyes and description
I've been asked to provide a listing of all the IDOC message types and it's associated description.
Does anyone know what table holds this information or a t-code that will allow me to create a file listing the message tpyes and descriptions?Use We81 --> Print -->Export
Maybe you are looking for
-
how do i get my music in my library that is in my itunes account on my desk top transferred to my lap top i tunes. the only thing that transferred was my purchased music none of my downloaded.
-
Wrong password PISUPER in PI_00 wizard
Hello I have install PI system (nw2004s). In the process of installing, I used master pasword for all users... include PISUPER and so on.. As SLD I used SLD on another PI system... After install I see what password PISUPER and so on PI users are don'
-
Email form as pdf (with data)
I'm new to using LiveCycle and Adobe Forms- so I know this question is redundant. I have read several threads regarding this same issue I'm having, but don't see any follow-up responses that provide solid solutions. I have created a fillable form u
-
Anyone know the History of the Apple symbol?
I'm probaby posting in the wrong section, but does anyone know the history behind the apple symbol? How and why was an apple chosen? Thanks
-
From client/server forms 6i to ... what?
I'm a developer who comes from the world of client/server oracle forms 6 vs Oracle 8i database, so I feel a bit lost in this web and 10g mess (maybe the mess was the prior 6i). I'm stuck manteining an application in that architecture, but I'd like to