Tagged Questions
0
votes
2answers
30 views
Powershell module and invoking files
I have a script based powershell module (.psm1) and I have it imported into my main script. This module however needs to call a batch file that is located inside its same directory but apparently it ...
2
votes
1answer
88 views
powershell in batch file
I'm trying to create a batch script with powershell included, but it does not work, as below
@echo off
rename D:\temp\*.csv temp.csv
powershell.exe -Command "& {Import-Csv D:\temp\temp.csv | ...
0
votes
1answer
41 views
Batch file to change screen resolution in windows 7
A colleague has a two line batch script to open excel when he logs in to his pc. He just doubleclicks it and has recently copied it to his startup folder so its automatic. i was wondering if i could ...
0
votes
0answers
16 views
batch script parsing text file skip headers on different pages
I have a text file with headers on each page that I need to parse through. Unfortunately, when I run the script with a "skip" obviously it only skips the headers on the very first page. I know I could ...
1
vote
6answers
33 views
Replace a character in a file using a batch script
I am new to batch file scripting and need to develop a script to replace a character in a file using a batch script.
I have to replace "servername/ActionService.asmx,1"
with ...
2
votes
4answers
62 views
Single script to run in both Windows batch and Linux Bash?
Is it possible to write a single script file which executes in both Windows (treated as .bat) and Linux (via Bash)?
I know the basic syntax of both, but didn't figure out. It could probably exploit ...
0
votes
3answers
39 views
batch command to use findstr with parameterised path
How do I use a parameterised path in findstr to find some text and get it?
I have used the below command but unfortunately it is not working. wheather it is able to find the text from file from a ...
0
votes
4answers
44 views
separate day month and year from a date batch file
when i do
echo %date%
i get output as
pet 28.06.2013
other dates
pon -> monday
tor -> tuesday
sre -> wedneday
cet -> thursday
pet -> friday
sob -> saturday
ned -> ...
0
votes
2answers
45 views
windows bat script find replace every file in folder and subfolders
First of all let me just say that I'm completely new to scripting.
I'm trying to develop a script which will find a given string and replace it with another given string. It must do this for every ...
0
votes
1answer
46 views
Batch Script to verify login credentials
I am writing a batch script for my department, that can perform some remote restart and connection verification functions. However, I want to ensure that the person using the batch script has active ...
0
votes
0answers
25 views
omit file location in text file created using fsearch and random name generation of new files
I'm currently writing a batch file to search in a folder to find any .txt file, compare this file to a stock list, and then write 2 new files (one containing the items in the list, one without).
I ...
0
votes
1answer
83 views
launching the xml files
Below hrcmd.cmd file
echo off
for /F %%a in ("%~fs0") do set THIS_DIR=%%~dpa
call %THIS_DIR%FRSetenv.cmd
set CLASSPATH=
set ANT_HOME=
set ANT_HOME=%HYPERION_ANT%
set JAVA_HOME=
set ...
-2
votes
1answer
50 views
Using windows ftp command to login with ssh key [closed]
I have google but found that what I want to do is possible using a third-party software, but can anyone answer this question:
I'm trying to ftp to linux server running sftp. I'm tryinh to connect to ...
0
votes
1answer
31 views
Coping files from multiple directories into one folder
I have many pictures in multiple directories and want to copy them to one folder, but my script is interrupted when a file with the same name already exists in the destination folder. I tried
for /R ...
1
vote
1answer
41 views
.bat script to compare contents of two windows folders
I would like to write a short .bat script to compare the contents of two folders.
Folder 1: Contains some 1300 files.
Folder 2: Contains some 400 files.
I would like to have a script I can run ...