Tag Info

New answers tagged

6

This can be accomplished using powershell. Get-ChildItem -Path C:\Temp -Include *.* -File -Recurse | foreach { $_.Delete()} This command gets each child item in $path, and executes the delete method on each one, and is quite fast. The folder structure is left intact. Update If you may have files w/out an extension, use Get-ChildItem -Path C:\Temp ...


2

Reading between the lines on your original question I can offer an alternative BATCH code line you can use. What this will do when ran is only delete files that are over 60 days old. This way you can put this in a scheduled task and when it runs it deletes the excess files that you don't need rather than blowing away the whole directory. You can change 60 ...


10

You can do so with del command: dir C:\folder del /S * The /S switch is to delete only files recursively.


0

Maybe someone can find this useful. This JavaScript code is based on the answer by dbenham above. I did not test sourceMask very much, but targetMask does match all examples given by dbenham. function maskMatch(path, mask) { mask = mask.replace(/\./g, '\\.') mask = mask.replace(/\?/g, '.') mask = mask.replace(/\*/g, '.+?') var r = new ...


1

To force the display to the console window append >CON to your lines. For example: Initialize.exe > con go run main.go > con


1

You can use the following command from a dosprompt: for /r %f in (*.png) do _pngout.exe "%f" or the following inside a batch file: for /r %%f in (*.png) do _pngout.exe "%%f" For /r also has support to give a start directory. Otherwise it'll use the current directory and get every file in all subdirectories that match your filemask.


0

I tried passing the password using command line and it worked fine for me. start C:\Users\pankmish\Downloads\putty.exe -ssh server_name -l user -pw %1 and executed command from my windows cmd as below test_file.bat password


0

This should help you some... @echo off ::Save passed parameter to a variable... set _loc=%~1 ::Check if passed parameter is a file/folder and process accordingly... if exist "%~s1\*" (echo Processing all files in folder %_loc% && echo. && goto :ProcFolders) else (echo Processing files && echo. && goto :ProcFile) goto ...


0

You may try the same trick of this answer: @if (@CodeSection == @Batch) @then @echo off rem Use %SendKeys% to send keys to the keyboard buffer set SendKeys=CScript //nologo //E:JScript "%~F0" rem Start the putty window with the user name only start C:\Windows\System32\putty.exe -ssh server_name -l user_name rem Send the password to putty window ...


0

I ended up finding a solution to my problem. A JBoss server can be configured as a service and set to start automatically. Here are the steps to do so: On the www.jboss.org/jbossweb/downloads web site, search for the current packages of the "Jboss Web Native Connectors", and download the binaries appropriate for the Windows operating system you are ...


0

You said this is a batch file. If you want the batch file to be run with admin privileges, you can just right click it and check the "Run as Administrator" box under the compatibility tab. This will make it acquire admin rights every time you run it.


2

You could re-invent the wheel and create your own wrapper to launch your program, using something like AutoIt, or your favorite programming language. Or you could use Uwe Sieber's ConsoleNoClose program to do just that: disable the Close (X) button on a command prompt window. When you launch the program it stays resident and disables the button on any open ...


0

Ok, I managed to get this to work. According to Microsoft: In order to use Windows PowerShell for SharePoint 2010 Products, a user must be a member of the SharePoint_Shell_Access role on the configuration database and a member of the WSS_ADMIN_WPG local group on the computer where SharePoint 2010 Products is installed. ...


1

Sharepoint is a beast to deal with. I would supsect UserB doesnt the proper sharepoint permissions and/or access to the content database I would compare the permission for UserA and UserB at the Windows, Sharepoint, and DB level to look for differences.


0

Yes, follow these steps: Open Notepad Enter the following cd %USERPROFILE% java -jar System.jar Go to File ยป Save As... Navigate to where you want to save the batch file. Select "All Files (*.*)" from the Save as type drop-down box. Enter WhateverYouWantToCallIt.bat in the File name text box. The important part of the filename is that it ends with ...


3

Batch files are really a sequence of commands that when the batch file is double-clicked or run, it runs those commands in order. In order to create a batch file, use a program like Notepad like so The command prompt will execute the cd command first, and then java, and after the java process closes (when your app closes), the command prompt will close ...



Top 50 recent answers are included