Reading a list of files and copy in an bat file

Athestreet
2014-05-19
2014-05-27
  • Athestreet

    Athestreet - 2014-05-19

    I don't know much of SFK but I have something working and would like to finish it.
    I have made tree directories. First called the IN directory second PROGRAM and third the OUTPUT.
    Every month comes 30 files automatically in the IN directory. In PROGRAM I have a bat file which contains this commando.
    ..\program\sfk166.exe partcopy ..\IN\KAS_02_TOTALS_20140519_V76.xml 320 145 ..\OUTPUT\KAS_02_TOTALS_20140519_V76_summarydata.txt -yes.
    And this 30 lines in the bat file. After running this bat.file comes in OUTPUT the necessary data of each file.
    Every month the filenames are different and I have to chance this *.bat file.
    Can someone help me with this to makes this automatically.

     
  • stahlworks

    stahlworks - 2014-05-27
     sfk select ..\IN .xml +run -spat "sfk partcopy $qfile 320 145 \q..\\OUTPUT\\$base_summarydata.txt\q -yes" -yes
    

    explanation:

     \IN .xml  selects all .xml files from \IN
     -spat     activates slash patterns like \q == a double quote
     $qfile    the input filename with quotes around in case it contains blanks
     $base     the file base name of input, i.e. KAS_02_TOTALS_20140519_V76 without .xml
    
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks