440 questions
-1
votes
1
answer
59
views
Bulk move the entire subdirectory containing a file to the root folder while preserving its structure
I am looking to bulk move the entire subdirectory containing a file to the root folder. Meaning if there are empty subdirectories in between, they will be deleted but everything beyond the level where ...
0
votes
1
answer
56
views
How to programmatically download a file from a synced SharePoint directory in Windows?
I synced a SharePoint directory to my Windows file system using OneDrive. As seen in the image below, some files are available locally, while others are only available in the cloud:
When I double-...
1
vote
1
answer
737
views
Copy new files from one folder to another folder automatically
I have a problem and don't know how to solve it myself. I haven't found anything on google either.
I have a folder called Trace, in this folder several devices save their trace files. When the devices ...
-1
votes
1
answer
159
views
Exiftool - Batch join tags keywords from JSON to jpg files
I have a thousands of JPG and corresponding JSON files in a Windows 10 directory, along with exiftool.exe:
0001.jpg
0001.jpg.json
0002.jpg
0002.jpg.json
0003.jpg
0003.jpg.json
...etc.
exiftool.exe
...
0
votes
2
answers
164
views
How to add Double quotes to Array elements in Powershell console?
I need to display all elements of the $FileNames array in Powershell console. I am iterating in a For loop but i cant print double quotes to all Array index elements on the console. Please help.
...
1
vote
1
answer
130
views
PowerShell Script to Replace non-HTML Tags
I'm working on a PowerShell script that aims to find lines in HTML files containing angle brackets not belonging to HTML tags. The script should replace said angle brackets with < and >. ...
1
vote
1
answer
3k
views
Logon scripts are running with admin powershell by default can this be changed?
Trying to configure a logon script (via Group Policy) on a Windows AMI (running on AWS). One of the things the script does is prompt the user for credentials at logon (via $host.ui.PromptForCredential)...
1
vote
1
answer
400
views
How to automatically set the Application Pool Identity, User Name & Password
Question
How can I automatically set the password of the Application Pool Identity from within a Windows commandline interface or script?
What I have Tried
I have tried to following command in ...
0
votes
1
answer
80
views
I need help figuring out where my code is getting hung up at
I have been tasked with coming up with a PowerShell script that I can run on computers at my organization to cleanup old user profiles in Windows.
The goal of the script is get a list of users on a pc,...
0
votes
1
answer
248
views
How can I create backup script for selected tables in Oracle
I am using below script to create backup file but it takes backup of all tables. I want backup of selected tables. how can I achieve this.
imp <username>/<password>@<hostname> file=&...
0
votes
0
answers
33
views
which script dont need any software setup or config
Apart from Batch script, which script I can use that don't need installation or configuration at client system and can be invoked from windows visual studio?
powershell python etc. needs installation.
...
0
votes
1
answer
178
views
Getting PowerShell Script Location at Run Time in PowerShell Command line
I am running a PowerShell script and calling $MyInvocation.PSCommandPath within the script and it returns null.
The script is meant to be run within a PowerShell Console because it has command line ...
0
votes
2
answers
234
views
Scanning Log Lines for Specific Destination IP Addresses and Extracting fields
I am reaching out to seek your expertise and assistance with a task I'm currently working on. I have a text file containing log lines, and I need to scan these lines for specific destination IP ...
1
vote
0
answers
24
views
Is there a way to assign display changes to a hotkey in Windows?
I'm a digital artist working from home.
I have two monitors: one is an actual 1920p Philips monitor and the other one is a 1920p Huion Kamvas drawing tablet.
I use the tablet both as a drawing surface ...
0
votes
1
answer
830
views
How to create multiple SMB shares with different share names mapped to different paths in PowerShell
I'm trying to figure out a way to script in PowerShell the creation of multiple SMB shares on a file server with different share names pointing to different paths. What I mean is having a variable ...
1
vote
1
answer
102
views
How to rename a workbook other than using (Name) and (FileSystemObject. MoveFile)?
Suppose I have a workbook on my desktop with name Test.xlsm and I need to rename it to Test2.xlsm in the same path.
I can rename it using Name statement as the following :
Sub Rename_using_Name()
...
0
votes
0
answers
113
views
Copy Single File to Destination Folder if Exist else Copy to Another Folder
I am trying to copy a file from one location to another. There are two possible source destinations on the computer I would like the script to check if the folder exists (i.e. -eq 'True') if doesn't ...
1
vote
1
answer
396
views
Batch rename files in Windows 10
I have a folder in which I need to rename all of the files to replace a string with another string:
File 01 (Something) ABC.txt ---> File 01 - ABC.txt
File 02 (Something) DEF.txt ---> File 02 - ...
0
votes
0
answers
82
views
PDF extract specific pages & merge with new filename
I have 2 pdf files (templates) from which I need to extract 1 page each and save as a combined pdf. Each pdf has a filename with a different 3 letter location indicator (e.g. LOC) for each of the ...
1
vote
1
answer
63
views
Edit xml file's DefaultValue using powershell script
I want to edit the DefaultValue for the Property name = "UseThis" using PowerShell script.
Xml file :
<?xml version="1.0"?>
<ConfigFile xmlns:xsd="http://www.w3.org/...
0
votes
0
answers
820
views
Import task scheduler xml file using cmd or powershell
I have exported task scheduler task in xml format and now i want to import it into different pc using cmd or powershell or any script only.
How can i import task scheduler xml file into task scheduler ...
0
votes
1
answer
370
views
How to modify created output using Microsoft PowerShell?
I've created a code in PowerShell to search through files to find lines containing null values '000' and create a new file that replaces these values with a user input. I've included the code below ...
1
vote
2
answers
5k
views
Activating Python Virtual env in Batch file
I'm trying to make a batch script (called run_windows) that check if the python virtual environment exists and if not, create it then activate it, install the requirements and finally run some python ...
-2
votes
2
answers
520
views
Lua Sleep and Loop function problems
So my script currently stops on conditions
if profit >= 0.1 then
stop()
end
i want to implement this code into mine so after the target satified it will sleep for 30 secs and then restart my ...
1
vote
0
answers
204
views
Inno Setup - Test DB connections with a Windows script
My goal is to be able to test a DB connection from Oracle, MySQL, PostgreSQL, SQL Server, etc., ideally without installing any drivers (probably not possible).
I'm working on Inno Setup. The user ...