How can I alter the move code to run it in run command when there are no files?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
I have an issue with the move run command giving me an error when there are no files to move.
This is the code I use at the moment: 'move "' +[User.LocalPath]+ "\*.xlsm*"+'"'+' "'+[User.LocalPath]+'\'+[year]+"\"+[DATE FICHIER]+'"'
How can I alter the code above to run it in run command when there are no files?
Best regards,
Denisa Grecu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I found this MS-DOS batch file that check if folders are empty, perhaps you may extend it so your "move" code happens when it detect "Not Empty" folders.
How can I check if the folder is empty or not in batch script?
I adapted the batch file to my environment:
call :ReportFolderState "%USERPROFILE%\Documents" |
hth
Arnaldo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I think like the directory tool, the process needs a file to not error.
As a work around I have been using a seed file like "seed.xlsm" move the file to [User.LocalPath] and back within the same workflow so its never empty.
I then filter the file names to eliminate the seed file
![](/skins/images/18F3BF3EB54AD3C2739B5AA9B77A7F97/responsive_peak/images/icon_anonymous_message.png)