そのためのPythonコードは以下の通りです。
```python
import os

# enter the directory path
dir1 = "/path/to/dir1"
dir2 = "/path/to/dir2"

# iterate through both directories
for file1, file2 in zip(sorted(os.listdir(dir1)), sorted(os.listdir(dir2))):
    if file1.endswith('.csv') and file2.endswith('.csv'):
        cmd = ['cmd1', os.path.join(dir1, file1), os.path.join(dir2, file2)]
        os.system(' '.join(cmd))
```
Here is the python code to do that
```python
import os

# enter the directory path
dir1 = "/path/to/dir1"
dir2 = "/path/to/dir2"

# iterate through both directories
for file1, file2 in zip(sorted(os.listdir(dir1)), sorted(os.listdir(dir2))):
    if file1.endswith('.csv') and file2.endswith('.csv'):
        cmd = ['cmd1', os.path.join(dir1, file1), os.path.join(dir2, file2)]
        os.system(' '.join(cmd))
```