Recently, we have a run in with a lot of our files turning into .cloudf formatting. After syncing our files again, we noticed that a lot of our files were brought back to their original formatting. However, when syncing, it didn’t look like we pulled our company files that have a prefix ‘~’.
Looking at our trashbin, a lot of the folders we synced back DID have files in them but they’re not showing in the desktop folders.
Any ideas on what we should do? We don’t want to just randomly restore all the files that were moved to trash in the case that there’s more loss of information from conflicts.
We actually have quite a few files with a leading ‘~’ that we need pulled. A lot of our PDFs are missing as they have the ‘~’. We have synced up the files and downloaded them back after having our folders turn into .cloudf files but we’re missing any PDF’s/files that have the prefix.
The files are showing up in my desktops recycle bin.
Looking at the link you just sent, it does look like this may have been closely related because a lot of files were randomly sent to trash on the 23rd.
I was following the comments but wasn’t sure what the resolution was.
What should I be doing to get my files back?
**Some additional information: Since this issue came up, we have still used some of the files that were still there and are concerned that there may be conflicts that arise if we were to simply ‘Restore’ all the files deleted on the 23rd. What’s the best suggestion here?
Hi @rohit,
All files that didn’t fall into the ignored pattern (hopefully just files beginning with ~ ) should already be in the cloud and shouldn’t need to be restored from trash. Any files that did begin with a ~ wouldn’t have been synced in the first place, so you should restore those and remove the leading ~ so they can sync up.
I’m not sure if this covers the issue entirely, so let me know if you have any questions.
There’s just the issue with restoring the files. A lot of the removed files were inside the folders as well.
You can see below that a lot of the deleted files are actually folders. The files that need to be restored are inside the subfolders/subsubfolders. This would be QUITE a bit of files to restore and the main folders would most likely cause conflicts as they’re already back and synced properly.
Is manually restoring the only option here???
the directories would look like …/mainA/folder1/~file.pdf
What we could do is drag those items to temporary location (instead of restoring just drag and drop the folders to a folder of your choosing).
Once we have the data in a “normal” folder, we can probably script up something, although I would need to look into that a little more. What I am thinking is that we copy only files with a leading ~ and then replace the ~ with another character after the copy.
Hi @rohit,
I have a script that should work. Here are the steps you will need to take:
Restore the trashed folders to a temporary location by dragging and dropping them from the Recycle bin into the folder you’ve chosen. For example, drag and drop the folders listed in your screenshot above into C:\Users\Administrator\Desktop\Recover\Company Data\Attach which should mimic where the files were, minus the C:\Users\Administrator\Desktop\Recover part. Try this with just one folder, initially, to make sure you understand the whole process.
Run the following script, which will copy all of the files starting with a ~ character from that folder into the original folder:
What this will do is search the source_folder (C:\Users\Administrator\Desktop\Recover) for any files starting with a ‘~’. It will then copy those files into destination_folder (C:), keeping the path elements after source_folder (Company Data\Attach) and replacing the ‘~’ with a ‘-’.
For example, C:\Users\Administrator\Desktop\Recover\Company Data\Attach\Folder1\~file1.txt would be copied to C:\Company Data\Attach\Folder1\-file1.txt
To run the command above, do the following:
You can open up a command prompt by clicking on the Windows icon in the taskbar, typing “cmd”, and then clicking on “Command Prompt”.
Thanks for the response. Looking at the script I think I get what we need to do here.
My concern is that with renaming the files, we’ll no longer be able to access them via QuickBooks. In order to view the file from QuickBooks, it searches up the exact location & filename and checks if its there; if it is, we can open it via QuickBooks as that was where we had previously stored it and it’s saved in QuickBooks.
Would it be possible to do this without the replace of the ~?
I’ll be giving it a try momentarily with one folder.
Hi @rohit,
The files will stay there unless the folder containing them disappears on the remote side, which is what happened when Amazon Drive was returning nothing during their incident. If the files have a leading ‘~’ they will not sync, however, so they will not be backed up to the cloud.
Hi @rohit,
It looks like some of the characters may have been changed on the copy. This can sometimes happen if the command is copied into an editor that likes to fancy-up the quotes, for example. You can see some of the quotation marks are typographical instead of neutral, where they are curved and reversed on opposite sides.
I have a feeling your pathing will need to be adjusted, but since this is just a test on a single folder, let’s see how it goes. I changed the destination to C:\temp in the above command too, so make sure that folder exists. I just wanted to make it a pure test case so you can see the behavior.
I was able to pull some directories/files but it would ask me to enter a ‘type’ for every file and would pull each directory/file individually.
So I would enter the following:
powershell -command " & {$source_folder = “C:\Users\Administrator\Desktop\Recover\Company Data\Attach{Company Name}\Txn”; $destination_folder = “C:\temp”; Get-ChildItem -Path “$source_folder” -Filter “~*” -Recurse | % { $source_file = $_.FullName; $destination_file = $source_file.Replace("$source_folder","$destination_folder").Replace("~","-"); new-item -Force “$destination_file”; copy -Path “$source_file” -Destination “$destination_file” -Recurse -Force;};}"
From there, it would ask for a ‘Type’ of which I would enter ‘directory’ or ‘file’. Once I hit enter, it would ask me the same thing and I’d have to enter ‘directory’ or ‘file’. When looking at the folder, it seems to be adding them one by one. Is there a command such that it just pulls the file without having to type ‘file’ each time? I was under the impression this was recursive.