How can I get no of files available in a single folder ?
HI friends...
How can I get no of files available in a single folder ?and also want the total no of files that r belongs to different extentions.. i.e. if I hava 2 doc n 3 text file or other formate..
I want to know all in seprate...
[http://forums.sun.com/thread.jspa?threadID=5333691&messageID=10435122#10435122]
trible?
Similar Messages
-
How Can I get a HeapDump file in JRockit R26.3 or latter version
I had tried "-Djrockit.oomdiagnostics.filename=oom.txt" arg,but it didn't work.
how can i get a heapdump file in JRockit R26.3 or latter version ?
I can only get the under infomation by using a ctrlhandler.act file.
======== BEGIN OF HEAPDIAGNOSTIC =========================
Invoked from ctrlbreakhandler
Total memory in system: 402075648 bytes
Available physical memory in system: 54231040 bytes
-Xmx (maximal heap size) is 314572800 bytes
Heapsize: 314572800 bytes
Free heap-memory: 0 bytes
mmStartCompaction = 0x01DC0000, mmEndCompaction = 0x03080000
3 GB mode was not used
--------- Detailed Heap Statistics: ---------
59.1% 110757k 1360491 +110757k [C
17.0% 31916k 1361767 +31916k java/lang/String
16.6% 31021k 1323579 +31021k java/util/HashMap$Entry
4.7% 8766k 1909 +8766k [Ljava/util/HashMap$Entry;
0.8% 1470k 2256 +1470k [B
0.3% 491k 480 +491k [Lweblogic/servlet/utils/URLMatchMap$URLMatchNode;
0.2% 342k 4871 +342k java/lang/Class
0.2% 283k 3942 +283k [Ljava/lang/Object;
0.1% 215k 1536 +215k [I
0.1% 172k 7376 +172k java/util/Hashtable$Entry
0.1% 157k 1552 +157k weblogic/management/tools/AttributeInfo
0.0% 83k 2421 +83k [Ljava/lang/String;
0.0% 83k 299 +83k [Ljava/util/Hashtable$Entry;
0.0% 74k 1900 +74k java/util/HashMap
0.0% 71k 1530 +71k java/lang/reflect/Method
0.0% 62k 472 +62k weblogic/servlet/internal/ServletStubImpl
0.0% 61k 461 +61k weblogic/management/runtime/ServletRuntimeMBean_Stub
0.0% 55k 2383 +55k java/util/ArrayList
0.0% 50k 3227 +50k java/lang/Integer
0.0% 48k 1552 +48k weblogic/management/internal/DynamicMBeanImpl$XAttributeInfo
0.0% 48k 1229 +48k java/util/WeakHashMap$Entry
0.0% 43k 1840 +43k java/lang/ref/WeakReference
0.0% 41k 528 +41k weblogic/rmi/internal/MethodDescriptor
0.0% 38k 1768 +38k [Ljava/lang/Class;
0.0% 38k 1637 +38k javax/management/modelmbean/DescriptorSupport$Pair
0.0% 37k 805 +37k weblogic/management/WebLogicObjectName
0.0% 34k 480 +34k [Lweblogic/servlet/utils/URLMatchMap$URLExtensionNode;
0.0% 33k 532 +33k weblogic/management/tools/OperationInfo
0.0% 32k 461 +32k weblogic/servlet/internal/ServletRuntimeMBeanImpl
0.0% 30k 982 +30k java/lang/ref/SoftReference
0.0% 26k 419 +26k weblogic/servlet/internal/dd/ServletDescriptor
0.0% 20k 423 +20k [Lweblogic/utils/collections/ConcurrentHashMap$Entry;
0.0% 19k 423 +19k weblogic/utils/collections/ConcurrentHashMap
0.0% 19k 1222 +19k java/util/jar/Attributes$Name
0.0% 18k 100 +18k [Ljava/lang/reflect/Method;
0.0% 17k 447 +17k weblogic/servlet/utils/URLMatchMap$URLMatchNode
0.0% 17k 12 +17k [J
0.0% 16k 425 +16k weblogic/servlet/internal/dd/UIDescriptor
0.0% 16k 684 +16k javax/management/MBeanParameterInfo
0.0% 15k 480 +15k weblogic/servlet/utils/URLMatchMap
0.0% 14k 471 +14k java/util/TreeMap$Entry
0.0% 14k 453 +14k javax/management/modelmbean/DescriptorSupport
0.0% 14k 638 +14k [Ljavax/management/MBeanParameterInfo;
0.0% 13k 431 +13k weblogic/servlet/internal/dd/ServletMappingDescriptor
0.0% 13k 852 +13k com/octetstring/vde/syntax/DirectoryString
0.0% 13k 431 +13k [S
0.0% 12k 553 +12k java/util/Vector
0.0% 11k 302 +11k java/lang/Package
0.0% 11k 369 +11k weblogic/xml/util/TernarySearchTree$Node
0.0% 11k 727 +11k java/lang/Boolean
0.0% 10k 266 +10k java/util/Hashtable
0.0% 9k 182 +9k java/net/URL
0.0% 9k 15 +9k [Ljava/util/WeakHashMap$Entry;
0.0% 9k 386 +9k weblogic/rmi/internal/ClientMethodDescriptor
0.0% 8k 158 +8k com/octetstring/vde/schema/AttributeType
0.0% 8k 90 +8k weblogic/logging/WLServerLogRecord
0.0% 8k 211 +8k weblogic/management/commo/CommoModelMBeanAttributeInfo
0.0% 8k 2 +8k [Lcom/octetstring/vde/backend/standard/KeyPtr;
0.0% 7k 322 +7k jrockit/vm/FCECache$FCE
0.0% 7k 471 +7k weblogic/servlet/internal/URLMatchHelper
0.0% 7k 58 +7k [Lweblogic/management/tools/AttributeInfo;
0.0% 7k 58 +7k [Lweblogic/management/internal/DynamicMBeanImpl$XAttributeInfo;
0.0% 6k 288 +6k weblogic/utils/collections/ConcurrentHashMap$Entry
0.0% 6k 431 +6k java/util/HashMap$EntrySet
0.0% 6k 428 +6k java/util/jar/Attributes
0.0% 6k 156 +6k jrockit/memory/SoftCache$ValueCell
0.0% 5k 379 +5k java/lang/Long
0.0% 5k 751 +5k java/lang/Object
0.0% 5k 77 +5k java/util/GregorianCalendar
0.0% 5k 231 +5k java/util/LinkedList$Entry
0.0% 5k 32 +5k weblogic/kernel/ExecuteThread
0.0% 4k 25 +4k weblogic/rmi/internal/BasicRuntimeDescriptor
0.0% 4k 111 +4k [Z
0.0% 4k 204 +4k com/octetstring/vde/backend/standard/KeyPtr
0.0% 4k 301 +4k com/bea/utils/misc/ProcessProperty
0.0% 4k 49 +4k weblogic/apache/xerces/impl/dv/xs/XSSimpleTypeDecl
0.0% 4k 73 +4k weblogic/jndi/internal/ApplicationNamingNode
0.0% 4k 58 +4k weblogic/management/tools/Info
0.0% 4k 290 +4k java/lang/Byte
0.0% 4k 289 +4k java/lang/Short
0.0% 4k 57 +4k [Ljava/lang/ThreadLocal$ThreadLocalMap$Entry;
0.0% 4k 275 +4k java/lang/Character
0.0% 4k 108 +4k java/math/BigInteger
0.0% 4k 60 +4k weblogic/management/commo/ModelMBeanTypeMBean
0.0% 4k 106 +4k java/util/TreeMap
0.0% 4k 172 +4k java/text/EntryPair
0.0% 3k 99 +3k weblogic/management/commo/CommoModelMBeanOperationInfo
0.0% 3k 12 +3k weblogic/management/configuration/WebAppComponentMBean_Stub
0.0% 3k 81 +3k sun/util/calendar/ZoneInfo
0.0% 3k 9 +3k [Lweblogic/utils/collections/WeakConcurrentHashMap$Entry;
0.0% 3k 95 +3k sun/misc/SoftCache$ValueCell
0.0% 3k 93 +3k weblogic/management/commo/CommoModelMBeanInfoSupport
0.0% 3k 115 +3k weblogic/servlet/internal/dd/ParameterDescriptor
0.0% 3k 108 +3k javax/management/ObjectName
0.0% 3k 104 +3k java/lang/StackTraceElement
0.0% 3k 137 +3k java/io/ExpiringCache$Entry
0.0% 3k 58 +3k [Lweblogic/management/tools/OperationInfo;
0.0% 3k 7 +3k weblogic/servlet/internal/WebAppServletContext
0.0% 3k 49 +3k jrockit/vm/ObjectMonitor
0.0% 2k 191 +2k java/util/HashSet
0.0% 2k 91 +2k java/util/ResourceBundle$LoaderReference
0.0% 2k 121 +2k weblogic/management/commo/Commo$Pair
0.0% 2k 4 +2k [Ljrockit/vm/FCECache$FCE;
0.0% 2k 7 +2k [[Ljava/lang/String;
0.0% 2k 30 +2k weblogic/management/internal/ConfigurationMBeanImpl
0.0% 2k 107 +2k jrockit/reflect/VirtualNativeMethodInvoker
0.0% 2k 12 +2k weblogic/management/configuration/ApplicationMBean_Stub
0.0% 2k 73 +2k java/lang/ThreadLocal$ThreadLocalMap$Entry
0.0% 2k 97 +2k java/util/LinkedList
0.0% 2k 95 +2k weblogic/apache/xerces/util/SymbolHash$Entry
0.0% 2k 56 +2k com/octetstring/vde/schema/ObjectClass
0.0% 2k 93 +2k sun/security/util/ObjectIdentifier
0.0% 2k 92 +2k java/util/ResourceBundle$ResourceCacheKey
0.0% 2k 92 +2k java/util/regex/Pattern$Range
0.0% 2k 91 +2k com/octetstring/vde/backend/standard/KeyEidList
0.0% 2k 25 +2k [Lweblogic/management/commo/CommoModelMBeanAttributeInfo;
0.0% 2k 12 +2k weblogic/management/mbeans/custom/Application
0.0% 1k 25 +1k [Lweblogic/rmi/internal/MethodDescriptor;
0.0% 1k 81 +1k weblogic/management/internal/Pair
0.0% 1k 30 +1k com/bea/utils/misc/Process
0.0% 1k 86 +1k [Lweblogic/management/WebLogicObjectName;
0.0% 1k 58 +1k weblogic/management/internal/DynamicMBeanImpl$XInfo
0.0% 1k 33 +1k sun/net/www/protocol/jar/URLJarFile
0.0% 1k 38 +1k java/util/jar/JarFile
0.0% 1k 74 +1k javax/management/NotificationBroadcasterSupport$Triple
0.0% 1k 72 +1k com/sun/management/jmx/MBeanServerNotificationListener
0.0% 1k 12 +1k weblogic/management/mbeans/custom/WebAppComponent
0.0% 1k 72 +1k weblogic/management/internal/OnewayNotificationListenerImpl
0.0% 1k 4 +1k [Lcom/sun/corba/se/internal/util/IdentityHashtableEntry;
0.0% 1k 30 +1k [Lcom/bea/utils/misc/ProcessProperty;
0.0% 1k 70 +1k java/util/Collections$SynchronizedList
0.0% 1k 2 +1k weblogic/management/configuration/ServerMBean_Stub
0.0% 1k 51 +1k weblogic/rmi/internal/PhantomRef
0.0% 1k 3 +1k [Ljava/util/TimerTask;
0.0% 1k 49 +1k weblogic/apache/xerces/dom/DeferredAttrImpl
0.0% 1k 39 +1k weblogic/jndi/internal/WLEventContextImpl
0.0% 1k 19 +1k weblogic/rmi/internal/BasicServerRef
0.0% 1k 92 +1k jrockit/memory/AtomicIntImpl
0.0% 1k 90 +1k weblogic/utils/DebugCategory
0.0% 1k 59 +1k javax/management/loading/MLetContent
0.0% 1k 16 +1k java/util/jar/JarFile$JarFileEntry
0.0% 1k 87 +1k weblogic/utils/collections/Stack
0.0% 1k 57 +1k java/lang/ThreadLocal$ThreadLocalMap
0.0% 1k 13 +1k weblogic/jndi/internal/AdminRoleBasedDispatchServerRef
0.0% 1k 13 +1k [Ljava/lang/Byte;
0.0% 1k 41 +1k weblogic/xml/babel/scanner/Token
0.0% 1k 25 +1k [Lweblogic/management/commo/CommoModelMBeanOperationInfo;
0.0% 1k 53 +1k java/util/Collections$SynchronizedRandomAccessList
0.0% 1k 52 +1k java/util/Date
0.0% 1k 12 +1k java/text/DecimalFormat
0.0% 1k 38 +1k sun/misc/URLClassPath$JarLoader
0.0% 1k 6 +1k weblogic/management/runtime/WebAppComponentRuntimeMBean_Stub
0.0% 1k 15 +1k [Lweblogic/apache/xerces/util/SymbolHash$Entry;
0.0% 1k 48 +1k java/util/Locale
0.0% 1k 14 +1k weblogic/common/internal/PeerInfo
0.0% 1k 20 +1k sun/nio/cs/ext/GBK$Encoder
0.0% 1k 44 +1k [Ljavax/management/NotificationBroadcasterSupport$Triple;
0.0% 1k 23 +1k weblogic/jndi/internal/ServerNamingNode
0.0% 1k 20 +1k [[B
0.0% 1k 27 +1k java/lang/reflect/Constructor
0.0% 1k 33 +1k java/util/zip/Inflater
0.0% 1k 1 +1k [Ljava/lang/Character;
0.0% 1k 1 +1k [Ljava/lang/Short;
0.0% 1k 1 +1k [Ljava/lang/Integer;
0.0% 1k 43 +1k sun/security/util/DerValue
0.0% 1k 43 +1k sun/security/util/DerInputBuffer
0.0% 1k 43 +1k java/security/AccessControlContext
0.0% 0k 9 +0k java/lang/Thread
0.0% 0k 21 +0k java/util/Properties
0.0% 0k 31 +0k java/util/Collections$SynchronizedSortedMap
0.0% 0k 31 +0k weblogic/servlet/utils/URLMatchMap$URLExtensionNode
0.0% 0k 4 +0k weblogic/management/configuration/JMSQueueMBean_Stub
0.0% 0k 11 +0k weblogic/kernel/ExecuteThreadManager
0.0% 0k 6 +0k weblogic/j2ee/J2EEApplicationContainer
0.0% 0k 20 +0k java/nio/HeapByteBuffer
187413kB total ---
--------- End of Detailed Heap Statistics ---
------------------- Printing heap ---------------------
"o"/"p" = 1k normal/pinned objects
"O"/"P" = 50k normal/pinned objects
"."/"/" = <1k normal/pinned objects (fragmentation)
" "/"_" = 1k/50k free space
OOOOoooooooooooooooooooooooooooooooooooooooooooooo 0x00B3BD08
........oooooooooooooooooooooooooooooooooooooooooo 0x00B48058
oooo....ooooooooooooooooooooo.....ooo..........OOO 0x00B6C278
OOOOooooooooooooooooooooooo....ooooooooooooooooooo 0x00BB42D0
oooooooooooooo.ooo..oooooooooooooooooooooooooooooo 0x00BC0620
oooooooooooooo.Ooooooooooooooooooooooooooooooooooo 0x00BD88D8
oo.....Ooooooooooooooooooooooooooooooooooooooooo.. 0x00BF0B90
...oooooooooooooooooooooooooooooooooooooooooooo... 0x00BFCEE0
...ooooo.....................................Ooooo 0x00C15198
oooooooooooooooooooooooooooooooooo................ 0x00C214E8
......o........oooo.oooooo....oo.Ooooooooooooooooo 0x00C397A0
ooooooooooooo.............................Oooooooo 0x00C51A58
ooooooooooooooooooooooooooooooo. . ...oooooooooooo 0x00C5DDA8
o..........................ooooooooooooooooooooooo 0x00C6A0F8
oooooooooooooooooooooo........ooo..o...ooooooooooo 0x00C76448
.......Hi all,
We have HPROF functionality in our latest roadmap, so you will see that feature in our next major release called JRockit R28.
I recommend, above from the MemLeak documentation suggested by Makiey, the following information on how to use JRockit tools.
Performance Tuning & Profiling:
http://download.oracle.com/docs/cd/E13150_01/jrockit_jvm/jrockit/geninfo/diagnos/part_02.html
Using JRockit tools:
http://download.oracle.com/docs/cd/E13150_01/jrockit_jvm/jrockit/geninfo/diagnos/part_03.html
Diagnostics & Troubleshooting
http://download.oracle.com/docs/cd/E13150_01/jrockit_jvm/jrockit/geninfo/diagnos/part_04.html
Best Regards,
Tuva
JRockit PM -
How can I get the lesson files for Aperture 3.2.4?
How can I get the lesson files for Aperture 3.2.4?
They are only available on the original Installer dvd with the boxed retail version.
But you can easily use your own photos to try out the tutorial videos. The videos are linked on the Aperture Support page. -
Exporting photos for UHDTV or Native 4K TV, what are the best settings ? (File: Quality File: Color Space, Image Sizing and resolution) Or in other words; How can I get the smallest files but keep good quality for display on new UHDTV
You're welcome, and thank you for the reply.
2) Yesterday I made the subclips with the In-Out Points and Command-U, the benefit is that I've seen the clip before naming it. Now I'm using markers, it's benefit is that I can write comment and (the later) clip name at once, the drawback is that I have to view to the next shot's beginning before knowing what the shot contains.
But now I found out that I can reconnect my clips independently to the format I converted the master clip to. I reconnected the media to the original AVI file and it worked, too! The more I work with, the more I'm sold on it... - although it doesn't seem to be able to read and use the date information within the DV AVI.
1) Ok, I tried something similar within FCE. Just worked, but the file size still remains. Which codec settings should I use? Is the export to DV in MOV with a quality of 75% acceptable for both file size and quality? Or would be encoding as H.264 with best quality an option for archiving, knowing that I have to convert it back to DV if I (maybe) wan't to use it for editing later? Or anything else?
Thank's in advance again,
André -
How can I get a pdf file in a word document?
How can I get a pdf file into a word document?
You want to insert a PDF into a Word doc, or you want to convert it? Either way, Adobe Reader cannot do any of these.
-
How can I get the ai. file? I've made a drawing for a company who would like to use it on a shirt. But they need the ai file. I made it with adobe illustrator for ipad.
Unfortunately logging into your account won't help, because then I don't have access to Illustrator.
I was just trying around a little if you could share it with me, but unfortunately sharing doesn't seem to work with Draw files. You could try and find someone near you who also has an iPad and Illustrator and then try to send it to them via AirDrop. But I don't know if that actually shares the file or just a PNG.
Maybe someone on the Draw forum has an idea how you could send the file to someone else.
Adobe Illustrator Draw -
How can i get my saved files from 4.1 to show up on 5.n?
how can i get my saved files from 4.1 to show up on 5.n?
The document saving portion of the app was moved to the printer control app for the 5.0 update. You can use file sharing to copy the files from your device with 4.1, and then copy them in to the printer control app after. This can either be done wirelessly, or by USB through itunes. The document below will show you how to do both options to get them copied off of the device. Then you simply do the same steps in the printer control app to copy files back in.
http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&taskId=120&prodSeriesId=...
Jon-W
I work on behalf of HP
Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
Click the KUDOS STAR on the left to say “Thanks” for helping! -
Hi,I have restored my iPhone 4s and i forgot to backup it before restore,so I haven't a backup.How can I get back my files from my iPhone??
One day this was happened to me:I deleted some videos that i don't need and after about a month i went to a music concert and i recorded with my iPhone for about 25-30 min and my iphone froze and automacitly restarted after a restart when a went home and i wanted to watch what i had recorded and in my camera roll on my iphone i saw the videos that i deleted about a month ago!!! With this fact i think that the videos aren't deleted they are somewhere i would pay how much is needed to get the videos and photos back .So please someone who knows something about this HELP ME PLEASE !!!!
-
When I move a RAW file from IPhoto on my macbook pro to desktop or Photoshop it changes to a jpeg and reduces in size. How can I get the Raw file to move across?
I create separate folders based on the year and then the actual date of when I take images. You can make those folders anywhere on any hard drive that is connected to your Mac whether internal or external. I also use the Photoshop Photo Downloader that is included with Photoshop/Bridge and it will create the date folder so all I do is create a Year folder.
Open Bridge or click on the Bridge icon in PS and in the File menu item in Bridge select "Get photos from Camera". It can be a camera connected to your Mac or a memory card from a camera. A window will open and you then select the camera or memory card. Set the location they will be downloaded to, just the folder and you can Browse to a folder that you created, then in the "Create Subfolders drop down select what date stamp you want to use or or custom name or not to create subfolders at all.
I've never cared for iPhoto one bit. I tried it but found it way to restrictive. It likes to have full control over how you interact with your images. -
When i try to access iwork on iCloud on my mac, i get an ipage logo with 2 options learn/get image. I already have ipage on my mac. How can i get to the file management page?
Lion will only let you add documents to iCloud through iCloud.com, iCloud.com requires the iOS apps before you can use it.
Mountain Lion will let you add documents to iCloud from the iWork apps themselves, you don't then need the iOS apps before they can be opened on another Mac. -
Teststand 1.03 - How can I get the sequence file path into an expression?
The sequence file will be located at different locations on different computers. I need the base address of the sequence file to get to the correct limits file. How can I get the sequence file path into a string-local expression.
ThanksAs Ray described, the FindFile expression function and TS API method will seach all TS search directories and return to you the path of your file, assuming the file is located in the search directories.
If you just want the path of a TS file that you have a reference to then there is a faster, easier method. You can use the Path property of the PropertyObjectFile class. In the attached example I use an AcitiveX Automation adapter step to call Path on the property RunState.SequenceFile. This returns the path to the current executing sequence file. Note that if you have not yet saved the sequence file then the path will be empty. In a subsequence step I strip off the file name leaving the root path of the file.
Attachments:
GetSeqFilePath.seq 22 KB -
How can i get Radio buttons and parameters in a Single Straight Line
Hi Experts,
How can i get Radio buttons and parameters in a Single Straight Line...
Example:
r1 r2 p1 p2.....
Cheers,
Priya
Points granted.Write the following code for the selection screen:
DECLARATION OF PARAMETERS.
SELECTION-SCREEN: BEGIN OF BLOCK select WITH FRAME TITLE text-001,
BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(10) FOR FIELD p_detail.
PARAMETERS p_detail RADIOBUTTON GROUP r1 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 25(10) FOR FIELD p_summry.
PARAMETERS p_summry RADIOBUTTON GROUP r1.
SELECTION-SCREEN: END OF LINE,
END OF BLOCK select.
this will solve your poblem surly. reward the points if you find helpful
Regards,
Siddarth -
How can I get rid of files that cannot be imported error message
Hello, this is my first post. I am a new mac user. I have imported my jpgs from an external hard drive which was in the most part successful, however, 14 of the files appear to be corrupted and every time I open iphoto9, I get the error message, '14 of your files could not be imported, would you like to import them now?' I have tried choosing both options yes and no and it then writes error message telling me it has created recovered photos folder. When you go to this folder it is empty and every time I restart iphoto, I get the same message. I have tried deleting all the files and re-importing only to find that the number of corrupted files has now doubled. I have also deleted the iphotos library recovered photo folders to no avail. I have tried creating a new library and importing the files to that but the same problem occurred. How can I get rid of this repeated error as I am now up to recovered folder number 47! Help!
P Robbins
Welcome to the Apple user to user assistance forums
quit iPhoto and right click (control click) on the iPhoto library (in the pictures folder by default) and select the show package contents command - find the import (or importing) folder and drag it to the desktop and launch iPhoto - you should be fine now - open the import(ing) folder on your desktop and if there are any photos you want import them then trash the folder
LN -
What i get is only the directories and files that in other nodes. But i have also files on the root directory and i never
get them. This is a screenshot of my program after i got the content of my ftp. I'm using treeView to display my ftp content:
You can see two directories from the root but no files on the root it self. And in my ftp server host i have files in the root direcory.
This is the method i'm using to get the directory listing:
public IEnumerable<FTPListDetail> GetDirectoryListing(string rootUri)
var CurrentRemoteDirectory = rootUri;
var result = new StringBuilder();
var request = GetWebRequest(WebRequestMethods.Ftp.ListDirectoryDetails, CurrentRemoteDirectory);
using (var response = request.GetResponse())
using (var reader = new StreamReader(response.GetResponseStream()))
string line = reader.ReadLine();
while (line != null)
result.Append(line);
result.Append("\n");
line = reader.ReadLine();
if (string.IsNullOrEmpty(result.ToString()))
return new List<FTPListDetail>();
result.Remove(result.ToString().LastIndexOf("\n"), 1);
var results = result.ToString().Split('\n');
string regex =
@"^" + //# Start of line
@"(?<dir>[\-ld])" + //# File size
@"(?<permission>[\-rwx]{9})" + //# Whitespace \n
@"\s+" + //# Whitespace \n
@"(?<filecode>\d+)" +
@"\s+" + //# Whitespace \n
@"(?<owner>\w+)" +
@"\s+" + //# Whitespace \n
@"(?<group>\w+)" +
@"\s+" + //# Whitespace \n
@"(?<size>\d+)" +
@"\s+" + //# Whitespace \n
@"(?<month>\w{3})" + //# Month (3 letters) \n
@"\s+" + //# Whitespace \n
@"(?<day>\d{1,2})" + //# Day (1 or 2 digits) \n
@"\s+" + //# Whitespace \n
@"(?<timeyear>[\d:]{4,5})" + //# Time or year \n
@"\s+" + //# Whitespace \n
@"(?<filename>(.*))" + //# Filename \n
@"$"; //# End of line
var myresult = new List<FTPListDetail>();
foreach (var parsed in results)
var split = new Regex(regex)
.Match(parsed);
var dir = split.Groups["dir"].ToString();
var permission = split.Groups["permission"].ToString();
var filecode = split.Groups["filecode"].ToString();
var owner = split.Groups["owner"].ToString();
var group = split.Groups["group"].ToString();
var filename = split.Groups["filename"].ToString();
var size = split.Groups["size"].Length;
myresult.Add(new FTPListDetail()
Dir = dir,
Filecode = filecode,
Group = group,
FullPath = CurrentRemoteDirectory + "/" + filename,
Name = filename,
Owner = owner,
Permission = permission,
return myresult;
And then this method to loop over and listing :
private int total_dirs;
private int searched_until_now_dirs;
private int max_percentage;
private TreeNode directories_real_time;
private string SummaryText;
private TreeNode CreateDirectoryNode(string path, string name , int recursive_levl )
var directoryNode = new TreeNode(name);
var directoryListing = GetDirectoryListing(path);
var directories = directoryListing.Where(d => d.IsDirectory);
var files = directoryListing.Where(d => !d.IsDirectory);
total_dirs += directories.Count<FTPListDetail>();
searched_until_now_dirs++;
int percentage = 0;
foreach (var dir in directories)
directoryNode.Nodes.Add(CreateDirectoryNode(dir.FullPath, dir.Name, recursive_levl+1));
if (recursive_levl == 1)
TreeNode temp_tn = (TreeNode)directoryNode.Clone();
this.BeginInvoke(new MethodInvoker( delegate
UpdateList(temp_tn);
percentage = (searched_until_now_dirs * 100) / total_dirs;
if (percentage > max_percentage)
SummaryText = String.Format("Searched dirs {0} / Total dirs {1}", searched_until_now_dirs, total_dirs);
max_percentage = percentage;
backgroundWorker1.ReportProgress(percentage, SummaryText);
percentage = (searched_until_now_dirs * 100) / total_dirs;
if (percentage > max_percentage)
SummaryText = String.Format("Searched dirs {0} / Total dirs {1}", searched_until_now_dirs, total_dirs);
max_percentage = percentage;
backgroundWorker1.ReportProgress(percentage, SummaryText);
foreach (var file in files)
TreeNode file_tree_node = new TreeNode(file.Name);
file_tree_node.Tag = "file" ;
directoryNode.Nodes.Add(file_tree_node);
numberOfFiles.Add(file.FullPath);
return directoryNode;
Then updating the treeView:
DateTime last_update;
private void UpdateList(TreeNode tn_rt)
TimeSpan ts = DateTime.Now - last_update;
if (ts.TotalMilliseconds > 200)
last_update = DateTime.Now;
treeViewMS1.BeginUpdate();
treeViewMS1.Nodes.Clear();
treeViewMS1.Nodes.Add(tn_rt);
ExpandToLevel(treeViewMS1.Nodes, 1);
treeViewMS1.EndUpdate();
And inside a backgroundworker do work how i'm using it:
var root = Convert.ToString(e.Argument);
var dirNode = CreateDirectoryNode(root, "root", 1);
e.Result = dirNode;
And last the FTPListDetail class:
public class FTPListDetail
public bool IsDirectory
get
return !string.IsNullOrWhiteSpace(Dir) && Dir.ToLower().Equals("d");
internal string Dir { get; set; }
public string Permission { get; set; }
public string Filecode { get; set; }
public string Owner { get; set; }
public string Group { get; set; }
public string Name { get; set; }
public string FullPath { get; set; }
Now the main problem is that when i list the files and directories and display them in the treeView it dosen't get/display
the files in the root directory. Only in the sub nodes.
I will see the files inside hello and stats but i need also to see the files in the root directory.
1. How can i get and list/display the files of the root directory ?
2. For the test i tried to add to a List<string> the items in var files to see if i get the root files at all.
This is what i tried in the CreateDirectoryNode before it i added:
private List<string> testfiles = new List<string>();
Then after var files i did:
testfiles.Add(files.ToList()
But this is wrong. I just wanted to see in testfiles what items i'm getting in var files in the end of the process.
Both var files and directoryListing are IEnumerable<FTPListDetail> type.
The most important is to make the number 1 i mentioned and then to do number 2.Risa no.
What i mean is this. This is a screenshot of my ftp server at my host(ipage.com).
Now this is a screenshot of my program and you can see that in my program i have only the directories hello stats test but i don't have the files in the root: htaccess.config swp txt 1.txt 2.png....all this files i don't have it on my treeView.
What i want it to be is that on my program on the treeView i will also display the files like in my ftp server.
I see in my program only the directories and the files in the directories but i don't see the files on the root directory/node.
I need it to be like in my ftp server i need to see in my program the htaccess 1.txt 2.png and so on.
So what i wrote in my main question is that in the var files i see this files of the root directory i just don't know to add and display them in my treeView(my treeView is treeViewMS1).
I know i checked in my program in the method CreateDirectoryNode i see in the first iteration of the recursive that var files contain this root files i just dont know how to add and display them in my treeView.
On the next iterations when it does the recursive it's adding the directories hello stats test and the files in this directories but i need it to first add the root files. -
I forgot my hidden file manager password,How can i get back my files
I forgot Hidden file manager password,how can i get back my my data
If you are able to Get Info on the folder of interest go the the very bottom section Sharing and Permissions.
You can gain access to this area by clicking on the lock in the lower right corner of the Get Info window.
Once you have input the admin password for the computer you should be able to edit the permissions on that file/directory.
Maybe you are looking for
-
Creating a user in Active Direcory
Hi, Here is the scenario. I am loading accounts into IdM through flatfile, after loading accounts into IdM, through actvesync I am trying to push any updated or new accounts into Active Directory. but I am unable to create account in AD, strangely I
-
IPod Touch 4G Stuck On Apple Logo Screen
So I just recently jail broke my iPod touch 4G and was using iFile to delete some default apps and stuff that was taking up space on my device. I only need to use the Music app, so all of the other default apps can be erased. I must have accidental
-
Could I please have an answer to resolve the problem?
-
Using InDesign CS2 on OS 10.6
We bought some new Macs running on OS 10.6. Unfortunately, our editorial system is still using InDesign CS2. And when we print, Indesign CS2 crashes. This has happened in all the Macs running on 10.6. Has anyone experienced this and solved it? We do
-
Polymorphic Entity Object on Database View ?
Hi all, We want to implement polymorphism on business components (EO, VO). I have some questions : 1) On the supertype-subtype, is it better to use ONE table for all subtypes , or using different tables with each subtype ? 2) Is it recommended to use