Questions tagged [batch]
Batch processing is the execution of a set of commands or software programs without user intervention. A batch file is a text file containing a sequence of such commands or programs invocations. Please use the tag [batch-file] for that.
4,003
questions
1
vote
1
answer
24
views
Batch script does not output file when limited user runs it from an administrator task manually
The Problem:
I want to let a limited user restart a Service. This requires admin privileges, and thus the limited user is unable to restart individual services. I also want to create a timestamp file ...
3
votes
4
answers
2k
views
redirect echo in a cmd batch file to a variable fail
I use the below function to check if echo is set on or off, and as you can see it pipes echo statuse and then uses the output to set a flag:
FUNCTION
:echos
echo > echo.txt & rem pipe ech ...
0
votes
1
answer
4k
views
Running a batch script from a network drive
I'm trying to install printers through command line which looks like:
start \\servername\\printername
I have to run cmd.exe as admin or it won't install drivers. This works well when running it ...
1
vote
1
answer
5k
views
How to set a folder name into a variable to use it in the same Batch file?
i want to make a batch file, This Batch file must look out, into a folder with the name "Draft" and for every sub-folder will be make a search for a .txt file "list.txt" and when finds this .txt file, ...
4
votes
2
answers
1k
views
Add backslash if a string doesn't have it
I'm developing a command line Batch file on Windows 7. I'm trying to add \ to a dir if it hasn't.
This is only a test:
@echo off
set solutionDir=%CD%\
echo %solutionDir%
if [%solutionDir:~-1%] ...
52
votes
4
answers
59k
views
Programatically associate file extensions with application on Windows
I've just recently reinstalled Windows and in setting up my environment I've noticed that all my associations for the various programming languages I edit in Notepad++ have gone (naturally).
I am ...
2
votes
2
answers
22k
views
Downloading all files from URL Folder to local folder
I want to download all contents from a url using Windows 10, like
https://example.com/folder
This folder may contain 100 files, and I want to put them all into
C:\backups
I am going to schedule this ...
0
votes
1
answer
7k
views
Make a .vbs running in background visible to be able to cancel it
I have a .vbs-Script that is running in the background endlessly. This script does not have any way for the user to interact with it; a regular user won't even notice something is running in the ...
1
vote
2
answers
15k
views
Windows batch, How to rename a directory to date and time with seconds
Windows batch,
How to rename a directory to date and time with seconds
Current drive and directory is S:\1 = a backup.
via batch, How to automate, How to rename a directory, not a file?
...
1
vote
1
answer
6k
views
Windows batch extract zip files, into folders based on zip name and combining similar zips
I have been searching for a way to bulk extract zip files in a directory and extract them into individual folders based on their zip file name.
I found: Extract all Zip's in a directory (incl. ...
9
votes
4
answers
10k
views
Linux command line tool to batch rename MP3 files based on ID3 tag info, or give random name if no ID3 info present
I have a bunch of recovered mp3 files that have system generated filenames. I want to use any embedded ID3 tag info in the files to rename each one to something human readable.
I've tried 'mp3rename' ...
1
vote
1
answer
2k
views
Batch Script to Pause and Resume One Drive Sync?
Is there a batch script or other way to Pause or Resume OneDrive local sync? I have some folders that are synced on One Drive. But I do not want it to continuously sync. I would like to have a a ...
0
votes
0
answers
47
views
move copies instead of moves
for /f "tokens=*" %%i in (%file_list%) DO (move "%src_folder%\%%i" "%dst_folder%")
This resulted in copy instead of move.
I need to remove the files from the source ...
0
votes
1
answer
5k
views
How to copy Folder directory including Root volume folder on Windows?
I would like to copy Recursively the full C:\Test Folder with all subdirectories including the Test folder and the folders permisions. I tried using the following commands but it only copies the files:...
54
votes
4
answers
115k
views
Using wildcards with the rmdir or rd command
Let's say there are some folder in the D: drive:
D:\Air
D:\Abonden
D:\All
D:\Whatever
I want to delete all folders starting with "A" (including all subfolders and files). I tried this command:
...