Jump to content

Powershell Help Urgent Please


Recommended Posts

Posted
Powershell help
 
bhaiyyalu please help on this
 
I have a Folder A which has 3 sub folders
 
say
 
folder 1
folder 2
folder 3
 
anni folder lo path ila undi like below
 
folder/xyz/filesss unnai
 
now assume folder 3 is latest
 
now question is I want the latest files ie folder3 files means Folder A/folder 3/xyz/filesss
 
please help me with this PS script
Posted
gci FolderA/folder3/xyz/ | sort LastWriteTime | select -last 1
Posted

bhaiyya i need to write a  condition that folder 3 latest anni.

 

Posted
Get-ChildItem \\100-build-p-001\BuildDrops\FolderA | ? { $_.PSIsContainer } | sort CreationTime -desc | select -f 1
 
 
i was able to get folder 3 latest anni
 
now i want inside folder 3 ie Folder3/xyz/list of files
 
how do i get those list of files and need to copy to a target location say c:temp
Posted

bhaiyya i need to write a  condition that folder 3 latest anni.

 

 

 

Get-ChildItem \\100-build-p-001\BuildDrops\FolderA | ? { $_.PSIsContainer } | sort CreationTime -desc | select -f 1
 
 
i was able to get folder 3 latest anni
 
now i want inside folder 3 ie Folder3/xyz/list of files
 
how do i get those list of files and need to copy to a target location say c:temp

 

gci folder3/xyz/ | sort LastWriteTime | select -last 1

path marchi chud...if u know folder 3 is latest....

Posted

 

Get-ChildItem \\100-build-p-001\BuildDrops\FolderA | ? { $_.PSIsContainer } | sort CreationTime -desc | select -f 1
 
 
i was able to get folder 3 latest anni
 
now i want inside folder 3 ie Folder3/xyz/list of files
 
how do i get those list of files and need to copy to a target location say c:temp

 

two ways

1) a command ni oka variable ki assign chesi... 

copy $variable C:\temp

 

2) adey command last lo | _$ petti copy _$ C:\temp

×
×
  • Create New...