jeudi 6 janvier 2022

Moving .zip files from randomly named subfolders into parent

I have a parent folder on a D drive called d:\dnbackup

Every evening a child folder with a random guid name is created in the parent. This guid named folder (child) contains a .zip file.

In the morning I manually move the .zip file out of the random folder (child) into the parent (d:\dnbackup) and then delete the guid named folder (child).

I plan to use a forfiles to delete the guid named folder (child) from the parent directory but I don't know the script or best way to do the initial move of the zip file. I cant get the name of the child folder changed.

The parent folder contains no other child folders just a collection of .zip files which I clean up after 5 days using a forfiles.

Any help would be appreciated




Aucun commentaire:

Enregistrer un commentaire