Question: I have a dataframe called 'maxDF'

```
factor max_condition
A       7
B       4
C       6

```

I have a list called 'my list' that contains several dataframes sharing the same variables (column names):

```
mylist <- c('A', 'B', 'C', etc)

```

Example of data frame structure

```
mylist$A
factor condition
A            0
A            3
A            6
A            7
A            8
A            9

mylist$B
factor condition
B            0
B            1
B            2
B            3
B            4
B            5

```

I want to subset these dataframes by dynamic conditions based on the condition taken from maxDF

I can make it manually for each dataframe as below

```
conditionA = maxDF$max_condition[maxDF$factor=='A']
filter(mylist$A, condition<=conditionA)

A
factor condition
A            0
A            3
A            6
A            7

```

I'd like to ask if there is any way to automatically subset all dataframes in the list 'mylist' instead of doing it one by one, as I have 99 dataframes in the real list.

I look forward to hearing your insights.

With kind regards,

Answer: 
Calling `Delete()` on the corresponding DirectoryInfo object should do the trick:

```
(Get-Item C:\SPI).Delete()
New-Item -ItemType SymbolicLink -Path C:\SPI -Target "C:\Users\Chino\Dropbox (Reserve Membership)\SPI"

```
No way to update the symbolic link as far as I know. Gotta use CMD to remove symbolic link and you could then re-create it using your powershell script. You would do it like this in powershell.

```
cmd /c "rmdir C:\SPI"

```