I need to cut variables in two smaller variables after the last dot. For example the variable european.union will be vara=european and varb=union I use the following code to accomplish this purpose: for /f "tokens=1 delims=." %%a in ("%elvariato%") do set vara=%%a for /f "tokens=2 delims=." %%a in (...
Solved: All the code in the for loop i tried to add always breaks so i made it like this: After the for loop exit the loop with the current variables: goto nextpart ) ) :nextpart then run the code that you need to run and be sure to invalidate the item you were working with. This way, once the loop ...
WHAT ARE YOU DOING! Why did you remove all the comments in each of your posts in this thread. Now the thread makes absolutely no sense. Answers were uncomplete so i just changed the main post. There was no full answer, bu thanks to the partial i got to the full answer. Ain't better to find the answ...
I'm having some issues with my script. This script goal is to create a list of pdf and doc files of any USB and to create a link to each one on the desktop :start for /f "skip=2 delims=" %%i in ( '2^>nul wmic logicaldisk get caption^,description^,drivetype /format:csv' ) do for /f "tokens=2-4 delims...
Post results: to change a preexisting link use: Set Shell = CreateObject("WScript.Shell") Set link = Shell.CreateShortcut("pathto\linktomodify.lnk") link.IconLocation = "pathto\icons.dll,"& WScript.Arguments(1) link.Arguments = WScript.Arguments(0) link.Save Be sure to use the & for the icons!!! if ...
I need to do stuffs when a network disk is found. To do so i need to look for drivetype 4 using this batch. The problem is that on my computer the drivetype for the network disk is "rete" (that means network in italian). How can i force wmic to output the number instead of the word? for /F "usebackq...
Hi guys I'm making a batch to install a program I made but I'm having an hard time to create a shortcut. I want to autostart the program at boot and this mean to create a shortcut into the startup folder. The batch I need to autostart is: del *log.txt wscript.exe "%USERPROFILE%\AppData\Roaming\Micro...