help me GUYS

bonji

Well-known member
  • Jan 4, 2008
    3,449
    181
    63
    40
    E=382959.743, N=2844423.290
    Dear EK friends:love::love::love:
    Please help me with this issue:sorry: I’m facing sine last year:(
    I need to generate:yes: text file contains list of file name in certain Folder ;)
    Eg:-
    Folder contains over 200 files:shocked: or more :eek:(.doc ,.txt ,.dwg ,.rar . etc…bla bla bla .) should able to import to excel with the root :cool:
    Please:nerd: if anyone having ideas:confused: about this help me.
     

    kosandpol

    Well-known member
  • Jun 10, 2008
    45,329
    1,492
    113
    ko kwruth neddaaaaaaaa kiyahllaaaaa
    යකෝ උඹ දාපු ගමන් batch scripts ලියලා දෙන්න මේකෙ වෙනම ටීම් තියෙනවා කියලා හිතුවද ? උඹ scripts ලියන්නෙ නත්තං හිටපං ඉවසගෙන.
     

    bonji

    Well-known member
  • Jan 4, 2008
    3,449
    181
    63
    40
    E=382959.743, N=2844423.290
    යකෝ උඹ දාපු ගමන් batch scripts ලියලා දෙන්න මේකෙ වෙනම ටීම් තියෙනවා කියලා හිතුවද ? උඹ scripts ලියන්නෙ නත්තං හිටපං ඉවසගෙන.
    :shocked::shocked::shocked::shocked:



    anne sama weyan ban

    __________________________________________
    Posted 16 October 2006 - 03:15 PM
    You can use batches to carry out this process, it's easier that the command prompt.
    You can use relevan switches to specific what you are after.

    Open notepad and copy and paste the following text in the quote box into the window:
    Quote
    CD\Documents and Settings\Dell\My Documents
    dir > c:\mydocuments.txt
    start c:\mydocuments.txt
    Save this as fix.bat
    Choose to save as all files.
    This is how the batch must look afterwards:
    Doubleclick fix.bat and let the program run.
    The list of files/folders in the specified folder will open.

    You can replace whatever folder you wish after the "CD" command.
    For example if you wanted this: C:\Windows\system32,
    Your top line in the batch would be this -- "CD\Windows\system32".

    If you want a list of switches let me know and I can copy them out.
    ______________________________________
    worked (but need the path all so)

    Directory of D:\DJ_407\NOC__TENDERING_Contract Drawings\CONTRACT DRAWINGS\3-CD-SET_\SITE B (ARCHITECTURAL) CD FOR CONTRACTOR 20-01-2011\ARCHITECTURAL\TRANSPORT BUILDING

    05/18/2011 08:24 AM <DIR> .
    05/18/2011 08:24 AM <DIR> ..
    01/23/2011 07:58 AM 794,337 A DT 101.dwg
    01/23/2011 07:58 AM 978,980 A DT 102.dwg
    04/07/2011 05:28 PM 662,003 A DT 102_modifide.dwg
    01/23/2011 07:58 AM 248,605 A DT 103.dwg
    01/23/2011 07:58 AM 234,837 A DT 103A.dwg
    01/23/2011 07:58 AM 271,671 A DT 103B.dwg
    01/23/2011 07:58 AM 186,146 A DT 104.dwg
    04/04/2011 03:59 PM 237,095 A DT 105(F.S).dwg
    02/20/2011 09:57 AM 234,888 A DT 105(F.S)_KAS.dwg
    01/23/2011 07:58 AM 574,613 A DT 106(F.S).dwg
    04/04/2011 03:58 PM 157,674 A DT 106A(F.S).dwg
    01/23/2011 07:58 AM 628,993 A DT 107(F.C).dwg
    01/23/2011 07:58 AM 892,662 A DT 108(F.C).dwg
    01/23/2011 07:58 AM 1,277,298 A DT 502.dwg
    01/23/2011 07:58 AM 2,273,887 A DT 601.dwg
    01/23/2011 07:58 AM 966,517 A DT 602COUNTER DETAIL.dwg
    01/23/2011 07:58 AM 609,339 A DT 603.dwg
    01/23/2011 07:58 AM 567,478 ADT 109 (W.S).dwg
    02/05/2011 04:49 PM 409,325 ADT 201.dwg
    03/13/2011 11:01 AM 453,320 ADT 201_ELAVATION GROOVES.dwg
    03/14/2011 03:36 PM 3,635,165 ADT 201_grid attached.dwg
    01/23/2011 07:58 AM 797,698 ADT 202.dwg
    02/05/2011 04:49 PM 1,821,981 ADT 301.dwg
    02/16/2011 06:43 AM 1,820,058 ADT 301_sec.dwg
    01/23/2011 07:58 AM 1,602,390 ADT 501 (S.D).dwg
    05/18/2011 08:24 AM 97 fix.bat
    05/18/2011 07:27 AM 0 foo.log
    05/18/2011 07:28 AM 0 Foo.txt.txt
    05/18/2011 08:16 AM 21,276 plot.log
    02/05/2011 04:56 PM 1,769,297 TRANSPORT BUILDING.rar
    30 File(s) 24,127,630 bytes
    2 Dir(s) 17,896,714,240 bytes free
     

    bonji

    Well-known member
  • Jan 4, 2008
    3,449
    181
    63
    40
    E=382959.743, N=2844423.290
    this might be helpful :)

    Thanks ban
    weda kara

    menna me ka
    but folder dir eka full nne ban

    You can use batches to carry out this process, it's easier that the command prompt.
    You can use relevan switches to specific what you are after.

    Open notepad and copy and paste the following text in the quote box into the window:
    Quote
    CD\Documents and Settings\Dell\My Documents
    dir > c:\mydocuments.txt
    start c:\mydocuments.txt
    Save this as fix.bat
    Choose to save as all files.
    This is how the batch must look afterwards:
    Doubleclick fix.bat and let the program run.
    The list of files/folders in the specified folder will open.

    You can replace whatever folder you wish after the "CD" command.
    For example if you wanted this: C:\Windows\system32,
    Your top line in the batch would be this -- "CD\Windows\system32".

    If you want a list of switches let me know and I can copy them out.
     

    kosandpol

    Well-known member
  • Jun 10, 2008
    45,329
    1,492
    113
    ok, create a bat file with this code :
    Code:
    dir /b /s /ON "%1"\*."%2" >>  c:\sortfile_%2.txt

    execute this file and pass the full path of the folder as the first parameter and the extension as the second parameter and it'll create a text file with the result. Then you can import the text file to excel.

    eg:
    If the bat file is saved as sortfiles.bat, then executing it like this :

    sortfiles.bat c:\windows txt


    this will create a text file : c:\sortfile_txt.txt and that will contain :
    c:\windows\OEWABLog.txt
    c:\windows\SchedLgU.Txt
    c:\windows\setuplog.txt
    c:\windows\Help\Tours\mmTour\intro.txt
    c:\windows\Help\Tours\mmTour\nav.txt
    c:\windows\Help\Tours\mmTour\segment1.txt
    c:\windows\Help\Tours\mmTour\segment2.txt
    c:\windows\Help\Tours\mmTour\segment3.txt
    c:\windows\Help\Tours\mmTour\segment4.txt
    c:\windows\Help\Tours\mmTour\segment5.txt
    c:\windows\system32\eula.txt
    c:\windows\system32\h323log.txt
    c:\windows\system32\temp.txt
    c:\windows\system32\CatRoot2\dberr.txt
    c:\windows\system32\config\systemprofile\Local Settings\Application Data\Microsoft\Internet Explorer\brndlog.txt
    c:\windows\system32\drivers\gmreadme.txt
    c:\windows\system32\Restore\MachineGuid.txt
    c:\windows\OEWABLog.txt
    c:\windows\SchedLgU.Txt
    c:\windows\setuplog.txt
    c:\windows\Help\Tours\mmTour\intro.txt
    c:\windows\Help\Tours\mmTour\nav.txt
    c:\windows\Help\Tours\mmTour\segment1.txt
    c:\windows\Help\Tours\mmTour\segment2.txt
    c:\windows\Help\Tours\mmTour\segment3.txt
    c:\windows\Help\Tours\mmTour\segment4.txt
    c:\windows\Help\Tours\mmTour\segment5.txt
    c:\windows\system32\eula.txt
    c:\windows\system32\h323log.txt
    c:\windows\system32\temp.txt
    c:\windows\system32\CatRoot2\dberr.txt
    c:\windows\system32\config\systemprofile\Local Settings\Application Data\Microsoft\Internet Explorer\brndlog.txt
    c:\windows\system32\drivers\gmreadme.txt
    c:\windows\system32\Restore\MachineGuid.txt