Batch file is executed only the first time
I have this batch file that checks if the current working directory is the same as the path provided and if they are the same it doesn’t do anything but if they are different it should change the current working directory to the path provided.
I have no Idea why I can’t get it to go to :2 so I hope someone knows why it don’t work. I was attempting to make a OS out of batch
this is the batch script
Wildcard(*) in destination directory for batch MOVE file
I am attempting to move a file to a directory with a “*” wildcard in name with below code:
Trying to remove all but 3 administrators via Batch file
I’ve written a .bat script to automate a cleanup process for our loaner machines.
I need to remove all but 3 local administrators as admins as part of that script… but that part specifically keeps failing.
Batch file to delete all contents of a folder
I created a batch script to delete all contents of a folder. It works , except that it is not able to delete a particular file with .rnl extension.The script is as given below:
Call file from OneDrive folder using Batch file
I am trying to call an XLSM file using a batch file in a OneDrive folder. But may be due to the dash (or whitespace), it tells me that the file is not found. Below is what I have. Any help is much appreciated. Thanks!
Only allow numbers with set /p command in windows batch
So I’m trying to write a program that ask a number to the user, and once the number is selected it’s written in a .txt file. my problem is, when I use set /p the user could enter letters or symbols too, but i don’t want it to be allowed.
So if the user writes something with a letter and/or a symbol, it should say something like “Not valid, please only use numbers.”
The only case where letters are allowed is if the user types “fin”, wich would end the program.
So my idea was to add a new line where the “rem” lines are (because that’s what i tried but it didn’t work), and it would check if %lot% only has numbers or not. Does someone have an idea of how to proceed ?
Writing filenames into a string using a loop
For a project, i must have a batch script responsible for FTP file uploading.
For easier debuging / letting us know when a problem happens, if ftp upload is unsuccesful, i’d like to send a mail listing the files what were not uploaded.
That is where i got stuck.
Can anyone help me understand where I’m going wrong in this command? [closed]
Closed 4 hours ago.
Command Prompt window closes from Windows batch script
I’m trying to make a Windows batch script, but the problem is that when the Google terminal loads, the Command Prompt window closes.