小编Dem*_*yan的帖子

Check if file exists, then move it

I'm trying to write a few lines of code in powershell, to check if a file arrived to a specific folder. If the file is there, copy it to another folder. No action required if the file is not there. So far I have only the copying part:

cd C:\
Move /y "C:\myfolder\*.csv" "C:\MyDestinationFolder"
Run Code Online (Sandbox Code Playgroud)

I can't find a simple code to check if the file is present.

powershell

3
推荐指数
1
解决办法
8546
查看次数

标签 统计

powershell ×1