Posts
batch file - counting number of files in folder and storing in a variable
- Get link
- X
- Other Apps
How To Count The Number Of rows filled with data In Excel?
- Get link
- X
- Other Apps
Count Items Based on Another Column
- Get link
- X
- Other Apps
Grren is New & Red is old products i want to get count of new products, for my reference i removed No for old one formula to get count of only no available products is MB=COUNTIFS(B:B,"*"&C2&"*",A:A,"<>") A B C D No AFO Column1 Column2 1 MB MB 4 2 DT DT 2 3 GPU GPU 3 4 INT+GPU 10 5 AMD+MB 6 Int+MB 7 NVI+GPU 8 DT MB DT MB GPU 9 PCO MB +Lexa (HG) RV DT UMA RV DT+NAVI14 Ref: https://contexturesblog.com/archives/2015/10/15/count-items-based-on-another-column/
Delete Files and Folders Older Than X Days
- Get link
- X
- Other Apps
Removing files / folders older than X days. This post contains a batch file, and a Powershell script that will do this. Batch File: @echo off :: set folder path set dump_path=c:\shares\dump :: set min age of files and folders to delete set max_days=7 :: remove files from %dump_path% forfiles -p %dump_path% -m *.* -d -%max_days% -c "cmd /c del /q @path" :: remove sub directories from %dump_path% forfiles -p %dump_path% -d -%max_days% -c "cmd /c IF @isdir == TRUE rd /S /Q @path" Powershell: # set folder path $dump_path = "C:\shares\dump" # set min age of files $max_days = "-7" # get the current date $curr_date = Get-Date # determine how far back we go based on current date $del_date = $curr_date.AddDays($max_days) # delete the files Get-ChildItem $dump_path -Recurse | Where-Object { $_.LastWriteTime -lt $del_date } | Remove-Item
How can I list P4 changes since a specific changelist
- Get link
- X
- Other Apps
Find a string by searching all tables in SQL Server Management Studio 2008
- Get link
- X
- Other Apps
Q) Is there any way to search for a string in all tables of a database in SQL Server Management Studio 2008? I want to search for string say john . The result should show the tables and their respective row that contain john . Solution: USE DATABASE_NAME DECLARE @ SearchStr nvarchar ( 100 ) = 'SEARCH_TEXT' DECLARE @ Results TABLE ( ColumnName nvarchar ( 370 ), ColumnValue nvarchar ( 3630 )) SET NOCOUNT ON DECLARE @ TableName nvarchar ( 256 ), @ ColumnName nvarchar ( 128 ), @ SearchStr2 nvarchar ( 110 ) SET @ TableName = '' SET @ SearchStr2 = QUOTENAME ( '%' + @ SearchStr + '%' , '''' ) WHILE @ TableName IS NOT NULL BEGIN SET @ ColumnName = '' SET @ TableName = ( SELECT MIN ( QUOTENAME ( TABLE_SCHEMA ) + '.' + QUOTENAME ( TABLE_NAME )) FROM INFORMATION_SCHEMA . TABLES WHERE TABLE_TYPE = 'BASE TABLE' ...