batch-processing

Is it possible to batch convert csv to xls using a macro?

旧巷老猫 提交于 2020-01-13 05:13:28
问题 I have a large amount of csv files that I need in .xls format. Is it possible to run a batch conversion with a macro or best done with another language? I have used this code http://www.ozgrid.com/forum/showthread.php?t=71409&p=369573#post369573 to reference my directory but I'm not sure of the command to open each file and save them. Here's what I have: Sub batchconvertcsvxls() Dim wb As Workbook Dim CSVCount As Integer Dim myVar As String myVar = FileList("C:\Documents and Settings

Grep for String and open at the corresponding line

别等时光非礼了梦想. 提交于 2020-01-11 10:03:33
问题 I'm having several occurrences of a specific string over several files in several lines obtained with grep . $ grep -rn --include="*.cpp" mystring lib/mlib/actionbuttonrule.cpp:300: mystring Foobar... lib/mlib/actionbuttonrule.cpp:314: other mystring lib/mlib/item.cpp:3025: /* mystring**/ lib/mlib/item.cpp:3082: mystring Foobar... lib/mlib/item.cpp:3095: Foo mystring bar I'd like to open these files sequencially on the corresponding lines. I tried to do it with vim , but so far no success

Grep for String and open at the corresponding line

为君一笑 提交于 2020-01-11 10:03:13
问题 I'm having several occurrences of a specific string over several files in several lines obtained with grep . $ grep -rn --include="*.cpp" mystring lib/mlib/actionbuttonrule.cpp:300: mystring Foobar... lib/mlib/actionbuttonrule.cpp:314: other mystring lib/mlib/item.cpp:3025: /* mystring**/ lib/mlib/item.cpp:3082: mystring Foobar... lib/mlib/item.cpp:3095: Foo mystring bar I'd like to open these files sequencially on the corresponding lines. I tried to do it with vim , but so far no success

Grep for String and open at the corresponding line

核能气质少年 提交于 2020-01-11 10:02:07
问题 I'm having several occurrences of a specific string over several files in several lines obtained with grep . $ grep -rn --include="*.cpp" mystring lib/mlib/actionbuttonrule.cpp:300: mystring Foobar... lib/mlib/actionbuttonrule.cpp:314: other mystring lib/mlib/item.cpp:3025: /* mystring**/ lib/mlib/item.cpp:3082: mystring Foobar... lib/mlib/item.cpp:3095: Foo mystring bar I'd like to open these files sequencially on the corresponding lines. I tried to do it with vim , but so far no success

How to build batches/buckets with linq

有些话、适合烂在心里 提交于 2020-01-06 21:12:16
问题 I need to create batches from a lazy enumerable with following requirements: Memory friendly: items must be lazy loaded even within each batch ( IEnumerable<IEnumerable<T>> , excludes solution building arrays) the solution must not enumerate twice the input (excludes solutions with Skip() and Take() ) the solution must not iterate through the entire input if not required (exclude solutions with GroupBy ) The question is similar but more restrictive to followings: How to loop through

User input multple values assigned to 1 variable BATCH

只谈情不闲聊 提交于 2020-01-06 07:07:16
问题 MY BATCH FILE LOOKS LIKE THIS ECHO OFF SET /P colu= Enter column name: SET /P sn= Enter ID (Press enter when finished): if %sn%={ENTER} GOTO START :START sqlcmd -U USER -P PWORD -S SERVER -d DBNAME-i sqlSCRIPT.sql -o LOG.txt -v delete=colu d_id=sn I want the user to be able to enter multiple ids in a single line. Those ID's will be deleted from the DB using the sqlScript.sql however this code is not allowing me to enter multple ids. It is looking at the values I enter as 1 whole value. For an

Batch script to check the Java home and compare java version

柔情痞子 提交于 2020-01-05 12:28:28
问题 Hi I need a batch script to check whether java home is available in the system and script to compare the java version My requirements are 1.) Script needs to check whether java home is set in the system.I think "echo %JAVA_HOME%" will do it.But if Java Home is not available it needs to display a message showing "Java home is not available.Please set the java home in Computer>Properties>Variables path". 2.) It needs to check the java version in the system and if the java vesion is higher than

JEE Batch Job Specification with many optional Steps

限于喜欢 提交于 2020-01-05 08:27:28
问题 Is there a way to achieve the following logic with JSR 352 Batch API? I have a series of Steps that each need to be executed based on a different condition known when starting the job. ConditionsEntity is provided by an external system. public List<Steps> createStepSequence(ConditionsEntity conditions) { if (conditions.isStep1Enabled()) { steps.add(step1) } if (conditions.isStep2Enabled()) { steps.add(step2) } if (conditions.isStep3Enabled()) { steps.add(step3) } //many more ifs return steps;

Script to rename files to parent folder, move renamed file and delete empty folder

↘锁芯ラ 提交于 2020-01-05 07:25:51
问题 Wondering if anyone here can help me out. I'm using Windows 7 and have a collection of movies and TV shows in individual folders which I'd like to be renamed to that of the folder name. For example: ../Media Files/Example Movie (2013)/EM2013.avi to: ../Media Files/Example Movie (2013)/Example Movie (2013).avi I'd then like the newly named file to be moved to the Media Files folder, and for the (then empty) folder to be deleted. So: ..Media Files/Example Movie (2013).avi I've searched for a

Windows Powershell - Rename a list of files using a list from a text document

点点圈 提交于 2020-01-05 01:09:29
问题 I tried using the following code to rename a folder of files "C:\www\folderx" using a text list "..\list.txt" , but I can't figure out how to get the current file index: Get-Childitem C:\www\folderx | % { $OldName = $_.name; $NewName = (GC ..\list.txt)[<CURRENT INDEX SHOULD GO HERE>]; # Rename-Item -Newname $NewName; Write-Output $("Renamed {0} to {1}" -f $OldName,$NewName); } 来源: https://stackoverflow.com/questions/17256501/windows-powershell-rename-a-list-of-files-using-a-list-from-a-text