cmd

Need to replace 13 blank spaces from 1 very long line of text file

混江龙づ霸主 提交于 2020-01-15 07:55:20
问题 I have a file (1.8 Mb) that has 1 single (very long) row of text. The values on that row are generally separated by 13 blank spaces. What I am trying to do is to replace these 13 blank spaces with a pipe | delimiter so that I can process this text file using SSIS. So far, I have had no success in programmatically processing this file using a batch file. I have tried using the below code that I got from another SO post. @echo off REM create empty file: break>R1.txt setlocal

Converting Robocopy Batch To VB Script

送分小仙女□ 提交于 2020-01-14 19:53:10
问题 I'm trying to convert a BATCH file I am still working on (question at Robocopy | Mirror Destination Including Source Parent Folder). I've made some progress, and the reason I moved to VB is to add a bit more functionality, like adding a dialog box to ask the user to browse for a folder they'd like to backup... Now the code I currently have (only partially converted from my original .bat file); Dim Command1 Set objShell = CreateObject("Shell.Application") Set objFolder = objShell

How to execute SQL file from CMD prompt using Java ProcessBuilder

为君一笑 提交于 2020-01-14 19:15:44
问题 I have written a java program using ProcessBuilder to launch CMD prompt & connect SQLPLUS to execute some SQL files. public class OracleConnect { public static void main(String[] args) throws IOException { String[] cmd = new String[] { "sqlplus", "<USER>/<PASSWORD>@<INSTANCE>" }; ProcessBuilder builder = new ProcessBuilder(cmd); Process process = builder.start(); BufferedReader br = new BufferedReader(new InputStreamReader(process.getInputStream())); BufferedWriter bw = new BufferedWriter(new

How to execute SQL file from CMD prompt using Java ProcessBuilder

感情迁移 提交于 2020-01-14 19:12:36
问题 I have written a java program using ProcessBuilder to launch CMD prompt & connect SQLPLUS to execute some SQL files. public class OracleConnect { public static void main(String[] args) throws IOException { String[] cmd = new String[] { "sqlplus", "<USER>/<PASSWORD>@<INSTANCE>" }; ProcessBuilder builder = new ProcessBuilder(cmd); Process process = builder.start(); BufferedReader br = new BufferedReader(new InputStreamReader(process.getInputStream())); BufferedWriter bw = new BufferedWriter(new

how i can display arabic letters in cmd

前提是你 提交于 2020-01-14 13:59:07
问题 can any one give my solution to display the arabic letters in cmd i tried to use chcp 1256 and chcp 62001 in cmd but it does not show the arabic letters correctly but when i search in the internet i found someone who said there is solution but it needs some files in windows 95 or windows 98 but i am not sure if he lying or not if there is files to display the arabic letters in cmd in windows 95 or windows 98 can any one upload those files to me or give me solution to display arabic letters in

Want to hide the cmd prompt screen

会有一股神秘感。 提交于 2020-01-14 08:54:22
问题 I have developed a utility which will get time of all servers in the list. System.Diagnostics.Process p; string server_name = ""; string[] output; p = new System.Diagnostics.Process(); p.StartInfo.FileName = "net"; p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StandardOutput.ReadLine().ToString() While executing this code. Cmd prompt screens are coming. I want to hide it from the user. What can I do for it? 回答1: You can tell the process to use no window or

What is the Windows/cmd.exe equivalent of Linux/bash's $? — the program exit/return code? [duplicate]

与世无争的帅哥 提交于 2020-01-14 08:49:07
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How do I get the application exit code from a Windows command line? In Unix/bash, I can simply say: $ echo $? to find out the return/exit code of a program, both from interactive and non-interactive shells. Now, how can I do the equivalent in Windows/cmd.exe? 回答1: Use "errorlevel", like this: IF ERRORLEVEL 1 GOTO ERROR The errorlevel command is a little peculiar; it returns true if the return code was equal to

Unable to get latest of a Web view on local machine

守給你的承諾、 提交于 2020-01-14 05:21:10
问题 I am trying to take latest using cleartool update command but it throws an error saying " abc " is not a valid snapshot view path, maybe because mine is not a snapshot view but rather a Web view. How can I get latest of Web view? My view is C:\CCRC\WKB Actual view on server looks something like //aet/ccase/vws1/s123/dev.po.vws How should I write the command to get the latest Web view? 回答1: As mentioned in "About ClearCase views" A web view is a copy-based ClearCase view that is tolerant of

Open SSH tunnel via Plink and run R Scripts via command line batch file

♀尐吖头ヾ 提交于 2020-01-14 05:11:11
问题 I am trying to open an SSH tunnel via Plink in the command line to run a few R scripts and I cannot get the R scripts to run and when they do run the tunnel was not created, so the connection to my database crashes. The Plink code looks like this: plink.exe -ssh [username]@[hostname] -L 3307:127.0.0.1:3306 -i "[SSH key]" -N Followed by the code to run the R scripts "C:\Program Files\R\R-3.2.1\bin\x64\R.exe" CMD BATCH qidash.R I cannot seem to get the tunnel to stay open to run the R script.

Copy files without recreating subdirectories

时光总嘲笑我的痴心妄想 提交于 2020-01-14 04:27:48
问题 I have a directory that has about 100 subfolders and close to 2,000 files within those subfolders (up to 4 layers). The files are .txt or .log, and each extension has a unique file name. I need to move or copy (whichever is faster) the files to the root of a different folder without recreating the subfolder structure like xcopy does. This is on Windows xp Thanks in advance. Existing: Dir1\Folder1\000111.txt Dir1\Folder2\000112.txt Dir1\Folder3\000113.log Dir1\Folder4\Dir2\000114.txt Dir1