Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Move or delete files

  • 18-05-2017 11:05pm
    #1
    Registered Users, Registered Users 2 Posts: 517 ✭✭✭


    I have a list of files with full pathname. And am looking to find out is there any tool or way of automating this either to move e the files or to delete them if possible


Comments

  • Registered Users, Registered Users 2 Posts: 1,931 ✭✭✭PrzemoF


    Probably you're not a linux user, but maybe windows have something similar to a shell (PowerShell??). Anyway, linux version would be:
    for F in $(cat file_list_here) ; do  rm "$F" ; done
    


  • Closed Accounts Posts: 22,648 ✭✭✭✭beauf


    I think I do this in DOS. Command line etc. But I think I have to move them to the root directory.

    I think you are referring to the Windows bug where it can't move or delete files with really long file names.

    Super weird this bug exists.


  • Registered Users, Registered Users 2 Posts: 10,906 ✭✭✭✭28064212


    Assuming you have a file at c:\dev\delete.txt with the files to be deleted like this:
    C:\dev\test\a.txt
    C:\dev\test\b.txt
    
    Then open up Powershell and run:
    get-content c:\dev\delete.txt | foreach-object {remove-item $_ -whatif}
    

    That shows you a dry-run (what would be deleted). To actually delete the items, just remove "-whatif"

    Boardsie Enhancement Suite - a browser extension to make using Boards on desktop a better experience (includes full-width display, keyboard shortcuts, dark mode, and more). Now available through your browser's extension store.

    Firefox: https://addons.mozilla.org/addon/boardsie-enhancement-suite/

    Chrome/Edge/Opera: https://chromewebstore.google.com/detail/boardsie-enhancement-suit/bbgnmnfagihoohjkofdnofcfmkpdmmce



Advertisement